aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikodemus Siivola <nikodemus@random-state.net>2012-04-09 12:14:59 +0300
committerNikodemus Siivola <nikodemus@random-state.net>2012-04-09 12:18:20 +0300
commit9bb6ab173dad9d309e7f7299193959328defdfa9 (patch)
treee4c6e2ecd5989f90bef3a7778d076f23a27b9ab4
parent58afa52dafb27503661e49ce60b9d37c2d84e49f (diff)
downloadtl-who-9bb6ab173dad9d309e7f7299193959328defdfa9.tar.gz
tl-who-9bb6ab173dad9d309e7f7299193959328defdfa9.tar.bz2
tl-who-9bb6ab173dad9d309e7f7299193959328defdfa9.zip
more expressive test results for STRING= tests
A bit ugly, but...
-rw-r--r--test/tests.lisp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/tests.lisp b/test/tests.lisp
index 88cbc6d..bbd2294 100644
--- a/test/tests.lisp
+++ b/test/tests.lisp
@@ -134,7 +134,15 @@ tests succeeded."
(let ((form (or (read stream nil) (done))))
(when verbose
(format t "~&~S" form))
- (cond ((eval form) nil)
+ (cond ((and (consp form) (eq 'string= (car form))
+ (stringp (third form)))
+ (destructuring-bind (gen expected) (cdr form)
+ (let ((actual (eval gen)))
+ (unless (string= actual expected)
+ (list (format nil "~@<~:@_ ~2:I~S~:@_Expected: ~S~
+ ~@:_ Actual: ~S~:>"
+ form expected actual))))))
+ ((eval form) nil)
(t (list (format nil "~S returned NIL" form)))))))
(setf (html-mode) html-mode)))))