summaryrefslogtreecommitdiffstats
path: root/Test/D07multibyte.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-06-12 09:30:39 +0100
committerPeter Stephenson <pws@zsh.org>2015-06-12 09:30:39 +0100
commitf1923bdfa6300a0d32e3329eb2488447f76b8970 (patch)
treeeed76e87f3e28384f5597030978d802265715a14 /Test/D07multibyte.ztst
parent35442: document MULTIBYTE is always on by default when available (diff)
downloadzsh-f1923bdfa6300a0d32e3329eb2488447f76b8970.tar
zsh-f1923bdfa6300a0d32e3329eb2488447f76b8970.tar.gz
zsh-f1923bdfa6300a0d32e3329eb2488447f76b8970.tar.bz2
zsh-f1923bdfa6300a0d32e3329eb2488447f76b8970.tar.lz
zsh-f1923bdfa6300a0d32e3329eb2488447f76b8970.tar.xz
zsh-f1923bdfa6300a0d32e3329eb2488447f76b8970.tar.zst
zsh-f1923bdfa6300a0d32e3329eb2488447f76b8970.zip
Add non-metafied character length handling.
Use this in regex module and add test using $'\ua0'. Rename mb_metacharinit() to mb_charinit() as it does not involve metafied characters.
Diffstat (limited to 'Test/D07multibyte.ztst')
-rw-r--r--Test/D07multibyte.ztst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
index c9ecb78e9..5f9e8abcf 100644
--- a/Test/D07multibyte.ztst
+++ b/Test/D07multibyte.ztst
@@ -484,3 +484,16 @@
# This doesn't look aligned in my editor because actually the characters
# aren't quite double width, but the arithmetic is correct.
# It appears just to be an effect of the font.
+
+ if zmodload -i zsh/regex 2>/dev/null; then
+ [[ $'\ua0' =~ '^.$' ]] && print OK
+ [[ $'\ua0' =~ $'^\ua0$' ]] && print OK
+ [[ $'\ua0'X =~ '^X$' ]] || print OK
+ else
+ print -u$ZTST_fd "Regexp test skipped, regexp library not found."
+ print -l OK OK OK
+ fi
+0:Ensure no confusion on metafied input to regex module
+>OK
+>OK
+>OK