[PATCH] test: use (format "%S") to print nil in emacs test.
Austin Clements
amdragon at MIT.EDU
Thu Aug 30 20:52:27 PDT 2012
LGTM. Alternatively, the test could be
(null (notmuch-wash....))
with the correct answer being 't'. That would avoid the awkward
detour through a string, but either way is good as long as this test
passes.
Quoth david at tethera.net on Aug 30 at 10:09 pm:
> From: David Bremner <bremner at debian.org>
>
> 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.
> ---
>
> This fixes another test failure on emacs24.
>
> I guess maybe all test_emacs output could be canonicalized this way,
> but I suspect that would be pretty disruptive.
>
> test/emacs-subject-to-filename | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename
> index 176e685..a0ffdfe 100755
> --- a/test/emacs-subject-to-filename
> +++ b/test/emacs-subject-to-filename
> @@ -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
More information about the notmuch
mailing list