git @ Cat's Eye Technologies Falderal / 051b426
Fix bug that was preventing expecting a multi-line exception message. catseye 10 years ago
3 changed file(s) with 21 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1919 > everySecond [a] = []
2020 > everySecond "silly" = head []
2121 > everySecond "silliness" = error "silliness"
22 > everySecond "supercilious" = error "not\non\nmy\nwatch"
23 > everySecond "suoilic\nrepus" = "not\non\nmy\nwatch"
2224 > everySecond (a : b : rest) = (b : everySecond rest)
2325
2426 A function taking Strings to Lists of Booleans. We test this by
7880 | silliness
7981 ? silliness
8082
83 The expected text of an exception can extend over several lines.
84
85 | supercilious
86 ? not
87 ? on
88 ? my
89 ? watch
90
91 The input and expected text and extend over several lines, too.
92
93 | suoilic
94 | repus
95 = not
96 = on
97 = my
98 = watch
99
81100 Another intentionally failing test to demonstrate how Falderal will
82101 present expecting an exception and not getting one.
83102
165165 coalesceLines ((ExpectedResult more):lines) (ExpectedResult last) =
166166 coalesceLines lines (ExpectedResult (last ++ "\n" ++ more))
167167 coalesceLines ((ExpectedError more):lines) (ExpectedError last) =
168 coalesceLines lines (ExpectedResult (last ++ "\n" ++ more))
168 coalesceLines lines (ExpectedError (last ++ "\n" ++ more))
169169 coalesceLines ((LiteralText more):lines) (LiteralText last) =
170170 coalesceLines lines (LiteralText (last ++ "\n" ++ more))
171171 coalesceLines ((QuotedCode more):lines) (QuotedCode last) =
00 --------------------------------
1 Total tests: 15, failures: 5
1 Total tests: 17, failures: 5
22 --------------------------------
33
44 FAILED: