diff options
Diffstat (limited to 'test/Main.hs')
-rw-r--r-- | test/Main.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/Main.hs b/test/Main.hs index 71723c3..e00ccf6 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -1,8 +1,10 @@ {-# LANGUAGE BlockArguments #-} +{-# 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 @@ -41,7 +43,9 @@ main = hspec do it "interpolates expressions" do (`shouldBe` "1") =<< let x = 1 :: Int in [sh|echo -n '#{show x}'|] it "interpolates monadic expressions" do - (`shouldBe` "1") =<< let x = 1 :: Int in [sh|echo -n '#{pure @IO x}'|] + (`shouldBe` "1") =<< let x = 1 :: Int in [sh|echo -n '#{{pure @IO x}}'|] + it "interpolates monadic expressions" do + (`shouldBe` "1") =<< runReaderT [sh|echo -n '#{{asks fst}}'|] (1 :: Int, 2 :: Int) it "preserves argument order" do (`shouldBe` "1 2") =<< let x = "1"; y = "2" in [sh|echo -n '#{x}' '#{y}'|] describe "quoting" do |