aboutsummaryrefslogtreecommitdiffstats
path: root/test/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Main.hs')
-rw-r--r--test/Main.hs4
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")