X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2Ftest-lib.el;h=e9e7c3798770e53c33fe7020133199b80e3d9982;hb=73b8f0b8d71af395667022395b6d6bb692c3aaf2;hp=6a39bbe2140995f9bb58cbfb2f6a9a68a0af14ef;hpb=73cc4105aa27f13464fcfdfe958e553842395789;p=notmuch diff --git a/test/test-lib.el b/test/test-lib.el index 6a39bbe2..e9e7c379 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -154,22 +154,21 @@ running, quit if it terminated." (defun notmuch-test-expect-equal (output expected) "Compare OUTPUT with EXPECTED. Report any discrepencies." - (if (equal output expected) - t - (cond - ((and (listp output) - (listp expected)) - ;; Reporting the difference between two lists is done by - ;; reporting differing elements of OUTPUT and EXPECTED - ;; pairwise. This is expected to make analysis of failures - ;; simpler. - (apply #'concat (cl-loop for o in output - for e in expected - if (not (equal o e)) - collect (notmuch-test-report-unexpected o e)))) - - (t - (notmuch-test-report-unexpected output expected))))) + (cond + ((equal output expected) + t) + ((and (listp output) + (listp expected)) + ;; Reporting the difference between two lists is done by + ;; reporting differing elements of OUTPUT and EXPECTED + ;; pairwise. This is expected to make analysis of failures + ;; simpler. + (apply #'concat (cl-loop for o in output + for e in expected + if (not (equal o e)) + collect (notmuch-test-report-unexpected o e)))) + (t + (notmuch-test-report-unexpected output expected)))) (defun notmuch-post-command () (run-hooks 'post-command-hook))