From f52795ea3e637396ac2bbdef8fa1b1b6f2088db6 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 4 Sep 2015 10:07:51 +0100 Subject: 36415: remap bytes from invalid multibyte characters. These now go to 0xdc00 + index. If wchar_t is a Unicode code point, this is by construction an invalid character within the Unicode range. If it isn't, we would hope the result was no worse than the current fudge. --- Test/D07multibyte.ztst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Test/D07multibyte.ztst') diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 0e3e98d38..3fadd8066 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -508,3 +508,20 @@ cd .. } 0:cd with special characters + + test_array=( + '[[ \xcc = \xcc ]]' + '[[ \xcc != \xcd ]]' + '[[ \xcc != \ucc ]]' + '[[ \ucc = \ucc ]]' + '[[ \ucc = [\ucc] ]]' + '[[ \xcc != [\ucc] ]]' + # Not clear how useful the following is... + '[[ \xcc = [\xcc] ]]' + ) + for test in $test_array; do + if ! eval ${(g::)test} ; then + print -rl "Test $test failed" >&2 + fi + done +0:Invalid characters in pattern matching -- cgit 1.4.1