git @ Cat's Eye Technologies Falderal / 67f3c1e
Display name of functionality in each failing test report. Cat's Eye Technologies 11 years ago
5 changed file(s) with 14 addition(s) and 36 deletion(s). Raw diff Collapse all Expand all
163163 blocks, at its headers. It should understand both underlined and atx-style
164164 headers.
165165
166 ### Display functionality, filename, line number, in each test result
167
168 ### permit UTF-8 encoded input to Haskell function-implemented tests
169
170 Falderal test documents are assumed to be UTF-8 encoded Markdown.
171
172 `py-falderal` runs "Haskell function"-implemented tests with a little `ghc`
173 hack that uses `readFile`.
174
175 But `readFile` on modern Haskell doesn't, by itself, understand UTF-8.
176
177 `py-falderal`'s little hack in this regard could use improvement.
178
179 No, it seems this is nothing to do with `py-falderal`, but rather, some
180 change to the version of Haskell supported by the `ghc` bundled with the
181 Haskell Platform. Closing as invalid.
182
183 So, the problem *actually* seems to be that Haskell's `readFile`, by
184 itself, doesn't know how to read UTF-8 files. `readFile` is used in
185 `py-falderal`'s "implemented by Haskell function" support (hack). Which
186 means that tests containing UTF-8 can't be run with this implementation
187 support (hack) right now.
188
189166 ### option to colourize test result output
190167
191168 Using one of the approaches listed here:
225202 2011-12-11
226203
227204 To make the standard failure report more useful, it should show the source
228 Falderal document filename(s) in the summary, the relevant source filename
229 in each error, and the implementation used to test the functionality in
230 each error.
205 Falderal document filename(s) in the summary.
206
207 ### Flag invalid sequences of lines as errors
208
209 2011-08-05
210
211 Currently, in `convertLinesToBlocks`, some invalid sequences of lines are
212 ignored. They should be flagged as errors in the test suite file.
231213
232214 (This was written against Test.Falderal but similar considerations could
233215 be made for py-falderal.)
234
235 ### Flag invalid sequences of lines as errors
236
237 2011-08-05
238
239 Currently, in `convertLinesToBlocks`, some invalid sequences of lines are
240 ignored. They should be flagged as errors in the test suite file.
241
242 (This was written against Test.Falderal but similar considerations could
243 be made for py-falderal.)
120120 def report(self):
121121 print "FAILED : " + self.format_text_block(self.test.description)
122122 print "Location: " + self.test.body_block.location()
123 print "Function: " + self.format_text_block(self.test.functionality.name)
123124 print "Impl : " + self.format_text_block(self.implementation)
124125 print "Body : " + self.format_text_block(self.test.body)
125126 print "Expected: " + self.format_text_block(self.test.expectation)
22 No CRLFs in test report (Intentional fail.)
33
44 Location: test-crlf.markdown, line 24
5 Function: CRLF
56 Impl : shell command "python crlf.py"
67 Body :
78 one
22 Cat dogs, too. (Intentional fail.)
33
44 Location: test-utf8.markdown, line 22
5 Function: Cat
56 Impl : shell command "python cat.py"
67 Body : n ← ★
78 Expected: output:
1415 Cat (file) dogs, too. (Intentional fail.)
1516
1617 Location: test-utf8.markdown, line 37
18 Function: Cat (file)
1719 Impl : shell command "python cat.py -f %(test-body-file) -o %(output-file)"
1820 Body : n ← ★
1921 Expected: output:
22 Cat dogs, too. (Intentional fail.)
33
44 Location: test1.markdown, line 28
5 Function: Cat
56 Impl : shell command "python cat.py"
67 Body : meow
78 Expected: output:
1415 Cat dogs, too. (Intentional fail.)
1516
1617 Location: test1.markdown, line 31
18 Function: Cat
1719 Impl : shell command "python cat.py"
1820 Body :
1921 purr