Fix bug that was preventing expecting a multi-line exception message.
catseye
11 years ago
19 | 19 |
> everySecond [a] = []
|
20 | 20 |
> everySecond "silly" = head []
|
21 | 21 |
> everySecond "silliness" = error "silliness"
|
|
22 |
> everySecond "supercilious" = error "not\non\nmy\nwatch"
|
|
23 |
> everySecond "suoilic\nrepus" = "not\non\nmy\nwatch"
|
22 | 24 |
> everySecond (a : b : rest) = (b : everySecond rest)
|
23 | 25 |
|
24 | 26 |
A function taking Strings to Lists of Booleans. We test this by
|
|
78 | 80 |
| silliness
|
79 | 81 |
? silliness
|
80 | 82 |
|
|
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 |
|
81 | 100 |
Another intentionally failing test to demonstrate how Falderal will
|
82 | 101 |
present expecting an exception and not getting one.
|
83 | 102 |
|
165 | 165 |
coalesceLines ((ExpectedResult more):lines) (ExpectedResult last) =
|
166 | 166 |
coalesceLines lines (ExpectedResult (last ++ "\n" ++ more))
|
167 | 167 |
coalesceLines ((ExpectedError more):lines) (ExpectedError last) =
|
168 | |
coalesceLines lines (ExpectedResult (last ++ "\n" ++ more))
|
|
168 |
coalesceLines lines (ExpectedError (last ++ "\n" ++ more))
|
169 | 169 |
coalesceLines ((LiteralText more):lines) (LiteralText last) =
|
170 | 170 |
coalesceLines lines (LiteralText (last ++ "\n" ++ more))
|
171 | 171 |
coalesceLines ((QuotedCode more):lines) (QuotedCode last) =
|
0 | 0 |
--------------------------------
|
1 | |
Total tests: 15, failures: 5
|
|
1 |
Total tests: 17, failures: 5
|
2 | 2 |
--------------------------------
|
3 | 3 |
|
4 | 4 |
FAILED:
|