diff options
author | Austin Clements <amdragon@MIT.EDU> | 2014-03-11 18:19:53 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-03-25 19:50:47 -0300 |
commit | 716af7deb8d0692ec3c867a599e29da61027b808 (patch) | |
tree | d3f3cf137b94fdc23135346f8635b035e55dd070 | |
parent | d647a1917361aaf39d19a2c32df16e8490082a0e (diff) |
test: Add broken test for Emacs boolean term escaping
The current term escaper gets most of these right, but fails to escape
things containing Unicode "fancy quotes" or things containing
non-whitespace control characters.
-rwxr-xr-x | test/T310-emacs.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index 00ae96a8..6c18bbd7 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -953,4 +953,16 @@ test_emacs '(notmuch-search "subject:\"search race test\" -subject:two") output=$(notmuch search --output=messages 'tag:search-global-race-tag') test_expect_equal "$output" "id:$gen_msg_id_1" +test_begin_subtest "Term escaping" +test_subtest_known_broken +output=$(test_emacs "(mapcar 'notmuch-escape-boolean-term (list + \"\" + \"abc\`~\!@#\$%^&*-=_+123\" + \"(abc\" + \")abc\" + \"\\\"abc\" + \"\x01xyz\" + \"\\x201cxyz\\x201d\"))") +test_expect_equal "$output" '("\"\"" "abc`~!@#$%^&*-=_+123" "\"(abc\"" "\")abc\"" "\"\"\"abc\"" "\"'$'\x01''xyz\"" "\"“xyz”\"")' + test_done |