From 09bc7ee2b56239020d1ef6bb1f5d7b4ef9f19db1 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 25 Jul 2006 18:10:37 +0000 Subject: 22557: turn on multibyte option by default --- Test/D02glob.ztst | 9 +++++++-- Test/D07multibyte.ztst | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 3 deletions(-) (limited to 'Test') diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index 409a73e30..7c76414f0 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -6,7 +6,9 @@ mkdir glob.tmp/dir3/subdir : >glob.tmp/{,{dir1,dir2}/}{a,b,c} - globtest () { $ZTST_testdir/../Src/zsh -f $ZTST_srcdir/../Misc/$1 } + globtest () { + $ZTST_testdir/../Src/zsh -f $ZTST_srcdir/../Misc/$1 + } regress_absolute_path_and_core_dump() { local absolute_dir=$(cd glob.tmp && pwd -P) @@ -175,7 +177,6 @@ >1: [[ path/testy = *((#s)|/)test((#e)|/)* ]] >1: [[ path/testy/ohyes = *((#s)|/)test((#e)|/)* ]] >1: [[ path/atest/ohyes = *((#s)|/)test((#e)|/)* ]] ->0: [[ bjrn = *[]* ]] >0 tests failed. globtest globtests.ksh @@ -263,6 +264,10 @@ >0: [[ Modules = (#i)*m* ]] >0 tests failed. + (unsetopt multibyte + [[ bjrn = *[]* ]]) +0:single byte match with top bit set + ( regress_absolute_path_and_core_dump ) 0:exclusions regression test > diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 683e8350e..263a7a44e 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -176,7 +176,7 @@ ?(eval):1: command not found: hähä=3 foo="Ølaf«Ødd«øpénëd«ån«àpple" - print -l ${(s.«.)foo} + print -l ${(s.«.)foo} ioh="Ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν, καὶ θεὸς ἦν ὁ λόγος." print -l ${=ioh} print ${(w)#ioh} @@ -228,3 +228,39 @@ 0:read multibyte characters <«»ignored >«» + + # See if the system grokks first-century Greek... + ioh="Ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν, καὶ θεὸς ἦν ὁ λόγος." + for (( i = 1; i <= ${#ioh}; i++ )); do + # FC3 doesn't recognise ῇ (U+1FC7: Greek small letter eta with + # perispomeni and ypogegrammeni, of course) as a lower case character. + if [[ $ioh[i] != [[:lower:]] && $i != 7 ]]; then + for tp in upper space punct invalid; do + if [[ $tp = invalid || $ioh[i] = [[:${tp}:]] ]]; then + print "$i: $tp" + break + fi + done + fi + done +0:isw* functions on non-ASCII wide characters +>1: upper +>3: space +>8: space +>11: space +>13: space +>19: punct +>20: space +>24: space +>26: space +>32: space +>35: space +>40: space +>44: space +>49: punct +>50: space +>54: space +>59: space +>62: space +>64: space +>70: punct -- cgit 1.4.1