aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Main.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/Main.hs b/test/Main.hs
index 96612dc..2f20997 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -1,10 +1,10 @@
{-# LANGUAGE BlockArguments #-}
+{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE QuasiQuotes #-}
module Main (main) where
-import Control.Monad.Reader
import Data.ByteString.Char8 qualified as B
import Data.ByteString.Lazy.Char8 qualified as LB
import Data.Text qualified as T
@@ -42,12 +42,8 @@ main = hspec do
it "passes `ByteString`" do
(`shouldBe` "foobar") =<< let x = B.pack "foobar" in [sh|echo '#{x}'|]
(`shouldBe` "foobar") =<< let x = LB.pack "foobar" in [sh|echo '#{x}'|]
- it "interpolates expressions" do
- (`shouldBe` "1") =<< let x = 1 :: Int in [sh|echo '#{show x}'|]
it "interpolates monadic expressions" do
- (`shouldBe` "1") =<< let x = 1 :: Int in [sh|echo '#{{pure @IO x}}'|]
- it "interpolates monadic expressions" do
- (`shouldBe` "1") =<< runReaderT [sh|echo '#{{asks fst}}'|] (1 :: Int, 2 :: Int)
+ (`shouldBe` "1") =<< let x = pure 1 :: IO Int in [sh|echo '#{{x}}'|]
it "preserves argument order" do
(`shouldBe` "1 2") =<< let x = "1"; y = "2" in [sh|echo '#{x}' '#{y}'|]
describe "quoting" do