about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-09-04 10:07:51 +0100
committerPeter Stephenson <pws@zsh.org>2015-09-04 10:07:51 +0100
commitf52795ea3e637396ac2bbdef8fa1b1b6f2088db6 (patch)
tree90e0760b1ad8942da1b255a8f4be8588c3c2cde3 /Test
parent32f5d3d8c16b4f3a11fa39c0ee378d72336ba853 (diff)
downloadzsh-f52795ea3e637396ac2bbdef8fa1b1b6f2088db6.tar.gz
zsh-f52795ea3e637396ac2bbdef8fa1b1b6f2088db6.tar.xz
zsh-f52795ea3e637396ac2bbdef8fa1b1b6f2088db6.zip
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.
Diffstat (limited to 'Test')
-rw-r--r--Test/D07multibyte.ztst17
1 files changed, 17 insertions, 0 deletions
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