[thin_check] Spot XML and be helpful.

This commit is contained in:
Joe Thornber
2017-09-15 15:22:04 +01:00
parent 9ba75c890b
commit b10d8d4440
3 changed files with 37 additions and 4 deletions

View File

@ -19,7 +19,8 @@
assert-equal
assert-eof
assert-starts-with)
assert-starts-with
assert-matches)
(import
(chezscheme)
@ -27,6 +28,7 @@
(list-utils)
(logging)
(process)
(regex)
(temp-file)
(utils)
(srfi s8 receive))
@ -215,6 +217,9 @@
(dsp ", ")
(wrt str)))))
(define (assert-matches pattern str)
(unless ((regex pattern) str)
(fail (fmt #f "string should match: " pattern ", " str))))
)