From a0f37e4b4e3dddf04e9b47ab71fc7f628f5e80f1 Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Tue, 5 Aug 2008 22:08:09 +0100 Subject: [PATCH] etest.el: Fixed etest-null. --- etest.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/etest.el b/etest.el index fcf35de..cbf25af 100644 --- a/etest.el +++ b/etest.el @@ -120,7 +120,11 @@ FUNC. Returns a test result." (defun etest-null (test) "Allows the use of `null' in a test." - (etest-ok `(null ,test))) + (let ((ret (eval test)) + (result '())) + (setq result (plist-put result :result (null ret))) + (setq result (plist-put result :comments (format "got: '%S'" ret))) + result)) (defun etest-eq (one two) "Allows the use of `eq' in a test." @@ -162,8 +166,7 @@ FUNC. Returns a test result." (match nil) (re (eval re)) (string (eval form)) - (comments (format "haystack: '%s'\n needle: '%s'" - string re)) + (comments (format " needle: '%s'\nhaystack: '%s'" re string)) (res (not (not (string-match re string)))) (result (list :result res))) (while (setq match (match-string (setq i (1+ i)) string)) -- 2.11.4.GIT