diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-07 06:01:47 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-07 06:01:47 +0100 |
commit | 88e897fa21d0de229700862b11761b8e33752dba (patch) | |
tree | 54da802b0e56a8697e8f597181db3361cd589341 /test | |
parent | 3c8288e53347b90968abe5afcb1addf3bea5e00e (diff) |
chore: allow impure interpolation
Diffstat (limited to 'test')
-rw-r--r-- | test/Main.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Main.hs b/test/Main.hs index 9bde55e..0d00db3 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -40,6 +40,10 @@ main = hspec do (`shouldBe` "foobar") =<< let x = LB.pack "foobar" in [sh|echo -n '#{x}'|] 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}'|] + it "preserves argument order" do + (`shouldBe` "1 2") =<< let x = "1"; y = "2"; in [sh|echo -n '#{x}' '#{y}'|] describe "quoting" do it "preserves arguments" do (`shouldBe` "foo\\ bar") |