From d6c9197ca4eaf60eeff2f437b9942e8df03aadfd Mon Sep 17 00:00:00 2001 From: Jeremy Schlatter Date: Fri, 14 Feb 2020 22:27:42 -0800 Subject: [PATCH] implement some tests from my todo list These are possible now that tests capture stdout. --- test/Spec.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/Spec.hs b/test/Spec.hs index 142d04e..d8fb6f6 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -828,6 +828,8 @@ spec = do > "..." >> "(fnd [= (car _) \\a] '(\"pear\" \"apple\" \"grape\"))" > "\"apple\"" + "(prn 1)" `is` "1 \n1" + "((fn (x) (prn 'hello) (cons 'a x)) 'b)" `is` "hello \n(a . b)" it "correctly interprets belexamples.txt" do slow {- 10 seconds -} $ "(dedup:sort < \"abracadabra\")" `is` "\"abcdr\"" @@ -911,15 +913,10 @@ spec = do -- @incomplete add these tests: -- - -- (prn 1) will return 1, but before doing so will print it. -- (stat x) -- (coin) -- (sys x) -- (thread x) - -- multiple expression body fn's: - -- (fn (x) - -- (prn 'hello) - -- (cons 'a x)) -- -- should be able to run the `bel` function -- - w/o problems with backquoting