]> git.notmuchmail.org Git - notmuch/commitdiff
test: use (format "%S") to print nil in emacs test.
authorDavid Bremner <bremner@debian.org>
Fri, 31 Aug 2012 01:05:51 +0000 (22:05 -0300)
committerDavid Bremner <bremner@debian.org>
Fri, 31 Aug 2012 01:05:51 +0000 (22:05 -0300)
The behaviour of "emacsclient --eval nil" changed from emacs23 to
emacs24, and in emacs24 it prints 'nil' rather than an empty string.

(format "%S" foo) produces a sexpr form of foo, and is consistent
between the two versions.

test/emacs-subject-to-filename

index 176e6859b0dbaba87d13f9bf87121eb49e469a83..a0ffdfef038aefcea46acd12f7d6e765e9c39d5a 100755 (executable)
@@ -8,10 +8,10 @@ test_emacs '(ignore)'
 
 # test notmuch-wash-subject-to-patch-sequence-number (subject)
 test_begin_subtest "no patch sequence number"
-output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number
-      "[PATCH] A normal patch subject without numbers")'
+output=$(test_emacs '(format "%S" (notmuch-wash-subject-to-patch-sequence-number
+      "[PATCH] A normal patch subject without numbers"))'
 )
-test_expect_equal "$output" ""
+test_expect_equal "$output" '"nil"'
 
 test_begin_subtest "patch sequence number #1"
 output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number