mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
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.
This commit is contained in:
parent
d647a19173
commit
716af7deb8
1 changed files with 12 additions and 0 deletions
|
@ -953,4 +953,16 @@ test_emacs '(notmuch-search "subject:\"search race test\" -subject:two")
|
||||||
output=$(notmuch search --output=messages 'tag:search-global-race-tag')
|
output=$(notmuch search --output=messages 'tag:search-global-race-tag')
|
||||||
test_expect_equal "$output" "id:$gen_msg_id_1"
|
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
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue