I'm making changes to the xml library to make xexpr
s serializable. What tests can I run to ensure I didn't break anything?
They're all here: racket/pkgs/racket-test/tests/xml at master · racket/racket · GitHub
thank you.
I made the changes in this commit:
to racket/collects/xml/private/core.rkt
.
This results in two test failures in the xml library tests, because the text of an exception no longer matches the expectation:
raco test: (submod (file "/Users/smb/GitHub/racket/pkgs/racket-test/tests/xml/test.rkt") test)
raco test: @(test-responsible 'jay)
--------------------
XML > Reading and Writing XML > read-xml/element > <!-- comment --><br />
FAILURE
name: check-exn
location: pkgs/racket-test/tests/xml/test.rkt:20:2
params:
'(#<procedure:.../tests/xml/test.rkt:22:3>
#<procedure:.../tests/xml/test.rkt:24:3>)
message: "Wrong exception raised"
exn-message:
"read-xml: parse-error: expected root element - received '#s(comment \" comment \")"
exn:
#(struct:exn:xml "read-xml: parse-error: expected root element - received '#s(comment \" comment \")" #<continuation-mark-set> (#(struct:srcloc string #f #f #f #f)) ...)
--------------------
--------------------
XML > Reading and Writing XML > syntax:read-xml/element > <!-- comment --><br />
FAILURE
name: check-exn
location: pkgs/racket-test/tests/xml/test.rkt:20:2
params:
'(#<procedure:.../tests/xml/test.rkt:22:3>
#<procedure:.../tests/xml/test.rkt:24:3>)
message: "Wrong exception raised"
exn-message:
"read-xml: parse-error: expected root element - received '#s(comment \" comment \")"
exn:
#(struct:exn:xml "read-xml: parse-error: expected root element - received '#s(comment \" comment \")" #<continuation-mark-set> (#(struct:srcloc string #f #f #f #f)) ...)
--------------------
253 success(es) 2 failure(s) 0 error(s) 255 test(s) run
2
2/255 test failures
Is this exception text part of the API or can I simply edit the test to update it with the new exception text?
Is there a way to run all the tests, other than by specifying the test files individually? raco test -l tests/xml/test
doesn't include the other tests in the tests/xml
directory.
raco test -c tests/xml
should do what you want.
Thanks, that did it. They all pass, provided that I amend the exception text in test.rkt
.