diff --git a/Test/Falderal/Demo.lhs b/Test/Falderal/Demo.lhs index 9946f25..a84a2ce 100644 --- a/Test/Falderal/Demo.lhs +++ b/Test/Falderal/Demo.lhs @@ -20,6 +20,8 @@ > everySecond [a] = [] > everySecond "silly" = head [] > everySecond "silliness" = error "silliness" +> everySecond "supercilious" = error "not\non\nmy\nwatch" +> everySecond "suoilic\nrepus" = "not\non\nmy\nwatch" > everySecond (a : b : rest) = (b : everySecond rest) A function taking Strings to Lists of Booleans. We test this by @@ -79,6 +81,23 @@ | silliness ? silliness +The expected text of an exception can extend over several lines. + +| supercilious +? not +? on +? my +? watch + +The input and expected text and extend over several lines, too. + +| suoilic +| repus += not += on += my += watch + Another intentionally failing test to demonstrate how Falderal will present expecting an exception and not getting one. diff --git a/Test/Falderal/Runner.hs b/Test/Falderal/Runner.hs index df39546..105369b 100644 --- a/Test/Falderal/Runner.hs +++ b/Test/Falderal/Runner.hs @@ -166,7 +166,7 @@ coalesceLines ((ExpectedResult more):lines) (ExpectedResult last) = coalesceLines lines (ExpectedResult (last ++ "\n" ++ more)) coalesceLines ((ExpectedError more):lines) (ExpectedError last) = - coalesceLines lines (ExpectedResult (last ++ "\n" ++ more)) + coalesceLines lines (ExpectedError (last ++ "\n" ++ more)) coalesceLines ((LiteralText more):lines) (LiteralText last) = coalesceLines lines (LiteralText (last ++ "\n" ++ more)) coalesceLines ((QuotedCode more):lines) (QuotedCode last) = diff --git a/expected.txt b/expected.txt index c93ce1a..9ff943f 100644 --- a/expected.txt +++ b/expected.txt @@ -1,5 +1,5 @@ -------------------------------- -Total tests: 15, failures: 5 +Total tests: 17, failures: 5 -------------------------------- FAILED: