diff options
author | Austin Clements <amdragon@MIT.EDU> | 2012-11-26 23:58:17 -0500 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-11-27 10:25:41 -0400 |
commit | dba1f6e43247fb66ef1068ad88672dfb6a2df624 (patch) | |
tree | 6110faac32a955a9faabe07c9729643a7dd6c2d2 /test | |
parent | 7611a72be2cf6488c4d57ac0545469ff7ae89760 (diff) |
test: Quote $output in calls to test_expect_equal
Previously, many tests in emacs-subject-to-filename didn't quote the
$output argument to test_expect_equal. As a result, if $output was
empty, test_expect_equal would be passed only one argument and would
abort the entire test script. By quoting the argument, we ensure
test_expect_equal will always receive two arguments.
Diffstat (limited to 'test')
-rwxr-xr-x | test/emacs-subject-to-filename | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename index 43529a48..43e13076 100755 --- a/test/emacs-subject-to-filename +++ b/test/emacs-subject-to-filename @@ -60,55 +60,55 @@ test_begin_subtest "filename #1" output=$(test_emacs '(notmuch-wash-subject-to-filename "just a subject line")' ) -test_expect_equal $output '"just-a-subject-line"' +test_expect_equal "$output" '"just-a-subject-line"' test_begin_subtest "filename #2" output=$(test_emacs '(notmuch-wash-subject-to-filename " [any] [prefixes are ] [removed!] from the subject")' ) -test_expect_equal $output '"from-the-subject"' +test_expect_equal "$output" '"from-the-subject"' test_begin_subtest "filename #3" output=$(test_emacs '(notmuch-wash-subject-to-filename " leading and trailing space ")' ) -test_expect_equal $output '"leading-and-trailing-space"' +test_expect_equal "$output" '"leading-and-trailing-space"' test_begin_subtest "filename #4" output=$(test_emacs '(notmuch-wash-subject-to-filename "!# leading ()// &%, and in between_and_trailing garbage ()(&%%")' ) -test_expect_equal $output '"-leading-and-in-between_and_trailing-garbage"' +test_expect_equal "$output" '"-leading-and-in-between_and_trailing-garbage"' test_begin_subtest "filename #5" output=$(test_emacs '(notmuch-wash-subject-to-filename "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890")' ) -test_expect_equal $output '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890"' +test_expect_equal "$output" '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890"' test_begin_subtest "filename #6" output=$(test_emacs '(notmuch-wash-subject-to-filename "sequences of ... are squashed and trailing are removed ...")' ) -test_expect_equal $output '"sequences-of-.-are-squashed-and-trailing-are-removed"' +test_expect_equal "$output" '"sequences-of-.-are-squashed-and-trailing-are-removed"' test_begin_subtest "filename #7" output=$(test_emacs '(notmuch-wash-subject-to-filename "max length test" 1)' ) -test_expect_equal $output '"m"' +test_expect_equal "$output" '"m"' test_begin_subtest "filename #8" output=$(test_emacs '(notmuch-wash-subject-to-filename "max length test /&(/%&/%%&¤%¤" 20)' ) -test_expect_equal $output '"max-length-test"' +test_expect_equal "$output" '"max-length-test"' test_begin_subtest "filename #9" output=$(test_emacs '(notmuch-wash-subject-to-filename "[a prefix] [is only separated] by [spaces], so \"by\" is not okay!")' ) -test_expect_equal $output '"by-spaces-so-by-is-not-okay"' +test_expect_equal "$output" '"by-spaces-so-by-is-not-okay"' # test notmuch-wash-subject-to-patch-filename (subject) test_begin_subtest "patch filename #1" |