diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-08 13:47:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-08 13:47:57 (GMT) |
commit | 80317c0d6d466a184a6f8c711981d601541deb89 (patch) | |
tree | 2cedd326bdc4dd22c46225c7e172a2764cb3aa4b /tests/utf.test | |
parent | 84eae501a3bc727f8d14da9b35a81f4551974e70 (diff) | |
download | tcl-80317c0d6d466a184a6f8c711981d601541deb89.zip tcl-80317c0d6d466a184a6f8c711981d601541deb89.tar.gz tcl-80317c0d6d466a184a6f8c711981d601541deb89.tar.bz2 |
More test-case cleanup. Enhance "testutfnext", so it can detect whether bytes after the string-end are read. The command will return -1 in that case. No need for additional arguments any more.
Diffstat (limited to 'tests/utf.test')
-rw-r--r-- | tests/utf.test | 192 |
1 files changed, 105 insertions, 87 deletions
diff --git a/tests/utf.test b/tests/utf.test index b45ce8c..2c16c85 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -186,15 +186,15 @@ test utf-5.2 {Tcl_UtfFindLast} {testfindlast testbytestring} { testfindlast [testbytestring abcbc] 98 } bc -test utf-6.1 {Tcl_UtfNext} {testutfnext testbytestring} { +test utf-6.1 {Tcl_UtfNext} testutfnext { # This takes the pointer one past the terminating NUL. # This is really an invalid call. testutfnext {} -} 1 -test utf-6.2 {Tcl_UtfNext} {testutfnext testbytestring} { +} -1 +test utf-6.2 {Tcl_UtfNext} testutfnext { testutfnext A } 1 -test utf-6.3 {Tcl_UtfNext} {testutfnext testbytestring} { +test utf-6.3 {Tcl_UtfNext} testutfnext { testutfnext AA } 1 test utf-6.4 {Tcl_UtfNext} {testutfnext testbytestring} { @@ -212,7 +212,13 @@ test utf-6.7 {Tcl_UtfNext} {testutfnext testbytestring} { test utf-6.8 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext A[testbytestring \xF8] } 1 -test utf-6.9 {Tcl_UtfNext} {testutfnext testbytestring} { +test utf-6.9.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xA0] +} 1 +test utf-6.9.1 {Tcl_UtfNext} {testutfnext testbytestring utf16} { + testutfnext [testbytestring \xA0] +} -1 +test utf-6.9.2 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xA0] } 1 test utf-6.10 {Tcl_UtfNext} {testutfnext testbytestring} { @@ -256,7 +262,7 @@ test utf-6.22 {Tcl_UtfNext} {testutfnext testbytestring} { } 1 test utf-6.23 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext [testbytestring \xE8] -} 1 +} -1 test utf-6.24 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext [testbytestring \xE8]G } 1 @@ -275,15 +281,27 @@ test utf-6.28 {Tcl_UtfNext} {testutfnext testbytestring} { test utf-6.29 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext [testbytestring \xE8\xF8] } 1 -test utf-6.30 {Tcl_UtfNext} {testutfnext testbytestring} { +test utf-6.30.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2] } 1 +test utf-6.30.1 {Tcl_UtfNext} {testutfnext testbytestring utf16} { + testutfnext [testbytestring \xF2] +} 1 +test utf-6.30.2 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \xF2] +} -1 test utf-6.31 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext [testbytestring \xF2]G } 1 -test utf-6.32 {Tcl_UtfNext} {testutfnext testbytestring} { +test utf-6.32.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { + testutfnext [testbytestring \xF2\xA0] +} 1 +test utf-6.32.1 {Tcl_UtfNext} {testutfnext testbytestring utf16} { testutfnext [testbytestring \xF2\xA0] } 1 +test utf-6.32.2 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \xF2\xA0] +} -1 test utf-6.33 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext [testbytestring \xF2\xD0] } 1 @@ -395,7 +413,7 @@ test utf-6.68 {Tcl_UtfNext} {testutfnext testbytestring} { test utf-6.69.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0] } 1 -test utf-6.69.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { +test utf-6.69.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0] } 4 test utf-6.70 {Tcl_UtfNext} {testutfnext testbytestring} { @@ -413,40 +431,40 @@ test utf-6.73 {Tcl_UtfNext} {testutfnext testbytestring} { test utf-6.74.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0]G } 1 -test utf-6.74.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { +test utf-6.74.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0]G } 4 test utf-6.75.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] } 1 -test utf-6.75.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { +test utf-6.75.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] } 4 test utf-6.76.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xD0] } 1 -test utf-6.76.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { +test utf-6.76.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xD0] } 4 test utf-6.77.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xE8] } 1 -test utf-6.77.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { +test utf-6.77.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xE8] } 4 test utf-6.78.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xF2] } 1 -test utf-6.78.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { +test utf-6.78.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xF2] } 4 test utf-6.79.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0G\xF8] } 1 -test utf-6.79.1 {Tcl_UtfNext} {testutfnext testbytestring fullutf} { +test utf-6.79.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0G\xF8] } 4 -test utf-6.80 {Tcl_UtfNext - overlong sequences} {testutfnext} { +test utf-6.80 {Tcl_UtfNext - overlong sequences} testutfnext { testutfnext \x00 } 2 test utf-6.81 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { @@ -470,25 +488,25 @@ test utf-6.86 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring} { test utf-6.87.0 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF0\x90\x80\x80] } 1 -test utf-6.87.1 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring fullutf} { +test utf-6.87.1 {Tcl_UtfNext - overlong sequences} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF0\x90\x80\x80] } 4 test utf-6.88 {Tcl_UtfNext, pointing to 2th byte of 3-byte valid sequence} {testutfnext testbytestring} { - testutfnext [testbytestring \xA0\xA0] + testutfnext [testbytestring \xA0\xA0\x00] } 1 test utf-6.89 {Tcl_UtfNext, pointing to 2th byte of 3-byte invalid sequence} {testutfnext testbytestring} { - testutfnext [testbytestring \x80\x80] + testutfnext [testbytestring \x80\x80\x00] } 1 -test utf-6.90.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} { +test utf-6.90.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF4\x8F\xBF\xBF] } 1 -test utf-6.90.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} { +test utf-6.90.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF4\x8F\xBF\xBF] } 4 test utf-6.91.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF4\x90\x80\x80] } 1 -test utf-6.91.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext testbytestring fullutf} { +test utf-6.91.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF4\x90\x80\x80] } 1 test utf-6.92.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext testbytestring ucs2} { @@ -515,23 +533,23 @@ test utf-6.94 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {te test utf-6.95 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \x80\x80\x80\x80] } 1 -test utf-6.96 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring G] 0 +test utf-6.96 {Tcl_UtfNext, read limits} testutfnext { + testutfnext G 0 } 0 test utf-6.97 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext [testbytestring \xA0] 0 } 0 -test utf-6.98 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext A[testbytestring G] 1 +test utf-6.98 {Tcl_UtfNext, read limits} testutfnext { + testutfnext AG 1 } 1 test utf-6.99 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext A[testbytestring \xA0] 1 } 1 test utf-6.100 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xD0\xA0G] 1 + testutfnext [testbytestring \xD0\xA0]G 1 } 0 test utf-6.101 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xD0\xA0G] 2 + testutfnext [testbytestring \xD0\xA0]G 2 } 2 test utf-6.102 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext [testbytestring \xD0\xA0\xA0] 1 @@ -539,95 +557,95 @@ test utf-6.102 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { test utf-6.103 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext [testbytestring \xD0\xA0\xA0] 2 } 2 -test utf-6.104 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xE8\xA0\xA0G] 1 +test utf-6.104 {Tcl_UtfNext, read limits} testutfnext { + testutfnext \u8820G 1 } 0 -test utf-6.105 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xE8\xA0\xA0G] 2 +test utf-6.105 {Tcl_UtfNext, read limits} testutfnext { + testutfnext \u8820G 2 } 0 -test utf-6.106 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xE8\xA0\xA0G] 3 +test utf-6.106 {Tcl_UtfNext, read limits} testutfnext { + testutfnext \u8820G 3 } 3 test utf-6.107 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xE8\xA0\xA0\xA0] 1 + testutfnext \u8820[testbytestring \xA0] 1 } 0 test utf-6.108 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xE8\xA0\xA0\xA0] 2 + testutfnext \u8820[testbytestring \xA0] 2 } 0 test utf-6.109 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xE8\xA0\xA0\xA0] 3 + testutfnext \u8820[testbytestring \xA0] 3 } 3 test utf-6.110.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 1 + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 1 } 1 -test utf-6.110.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 1 +test utf-6.110.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 1 } 0 test utf-6.111.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 2 + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 2 } 1 -test utf-6.111.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 2 +test utf-6.111.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 2 } 0 test utf-6.112.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 3 + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 3 } 1 -test utf-6.112.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 3 +test utf-6.112.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 3 } 0 test utf-6.113.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 4 + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 4 } 1 -test utf-6.113.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { - testutfnext [testbytestring \xF2\xA0\xA0\xA0G] 4 +test utf-6.113.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { + testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 4 } 4 test utf-6.114.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 1 } 1 -test utf-6.114.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { +test utf-6.114.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 1 } 0 test utf-6.115.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 2 } 1 -test utf-6.115.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { +test utf-6.115.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 2 } 0 test utf-6.116.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 3 } 1 -test utf-6.116.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { +test utf-6.116.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 3 } 0 test utf-6.117.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 4 } 1 -test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { +test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs4} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 4 } 4 test utf-6.118 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { - testutfnext [testbytestring \xA0G] 0 + testutfnext [testbytestring \xA0]G 0 } 0 test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xA0G] 1 + testutfnext [testbytestring \xA0]G 1 } 1 test utf-6.120 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xA0\xA0] 1 } 1 test utf-6.121 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xA0\xA0G] 2 + testutfnext [testbytestring \xA0\xA0]G 2 } 1 test utf-6.122 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xA0\xA0\xA0] 2 } 1 test utf-6.123 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xA0\xA0\xA0G] 3 + testutfnext [testbytestring \xA0\xA0\xA0]G 3 } 1 test utf-6.124 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xA0\xA0\xA0\xA0] 3 } 1 test utf-6.125 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { - testutfnext [testbytestring \xA0\xA0\xA0\xA0G] 4 + testutfnext [testbytestring \xA0\xA0\xA0\xA0]G 4 } 1 test utf-6.126 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { testutfnext [testbytestring \xA0\xA0\xA0\xA0\xA0] 4 @@ -699,19 +717,19 @@ test utf-7.9.2 {Tcl_UtfPrev} {testutfprev testbytestring} { test utf-7.10.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF2\xA0] } 2 -test utf-7.10.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.10.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF2\xA0] } 1 test utf-7.10.2 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 3 } 2 -test utf-7.10.3 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.10.3 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 3 } 1 test utf-7.10.4 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF2\xA0\xF8\xA0] 3 } 2 -test utf-7.10.5 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.10.5 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF2\xA0\xF8\xA0] 3 } 1 test utf-7.11 {Tcl_UtfPrev} {testutfprev testbytestring} { @@ -756,19 +774,19 @@ test utf-7.14.2 {Tcl_UtfPrev} {testutfprev testbytestring} { test utf-7.15.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF2\xA0\xA0] } 3 -test utf-7.15.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.15.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF2\xA0\xA0] } 1 test utf-7.15.1.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 4 } 3 -test utf-7.15.1.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.15.1.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF2\xA0\xA0\xA0] 4 } 1 test utf-7.15.2.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF2\xA0\xA0\xF8] 4 } 3 -test utf-7.15.2.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.15.2.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF2\xA0\xA0\xF8] 4 } 1 test utf-7.16 {Tcl_UtfPrev} testutfprev { @@ -792,49 +810,49 @@ test utf-7.17.2 {Tcl_UtfPrev} {testutfprev testbytestring} { test utf-7.18.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xA0\xA0\xA0] } 3 -test utf-7.18.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.18.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xA0\xA0\xA0] } 3 test utf-7.18.2 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xA0\xA0\xA0\xA0] 4 } 3 -test utf-7.18.3 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.18.3 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xA0\xA0\xA0\xA0] 4 } 3 test utf-7.18.4 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xA0\xA0\xA0\xF8] 4 } 3 -test utf-7.18.5 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.18.5 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xA0\xA0\xA0\xF8] 4 } 3 test utf-7.19.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF8\xA0\xA0\xA0] } 4 -test utf-7.19.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.19.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF8\xA0\xA0\xA0] } 4 test utf-7.20.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF2\xA0\xA0\xA0] } 4 -test utf-7.20.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.20.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF2\xA0\xA0\xA0] } 1 test utf-7.21.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A\u8820[testbytestring \xA0] } 4 -test utf-7.21.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.21.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A\u8820[testbytestring \xA0] } 4 test utf-7.22.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xD0\xA0\xA0\xA0] } 4 -test utf-7.22.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.22.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xD0\xA0\xA0\xA0] } 4 test utf-7.23.0 {Tcl_UtfPrev} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xA0\xA0\xA0\xA0] } 4 -test utf-7.23.1 {Tcl_UtfPrev} {testutfprev testbytestring fullutf} { +test utf-7.23.1 {Tcl_UtfPrev} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xA0\xA0\xA0\xA0] } 4 test utf-7.24 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { @@ -861,7 +879,7 @@ test utf-7.28.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} test utf-7.29.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF0\x80\x80\x80] } 4 -test utf-7.29.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { +test utf-7.29.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF0\x80\x80\x80] } 4 test utf-7.30 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { @@ -873,7 +891,7 @@ test utf-7.31 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { test utf-7.32 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { testutfprev A[testbytestring \xF0\x80\x80\x80] 2 } 1 -test utf-7.33 {Tcl_UtfPrev -- overlong sequence} {testutfprev} { +test utf-7.33 {Tcl_UtfPrev -- overlong sequence} testutfprev { testutfprev A\x00 } 1 test utf-7.34 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { @@ -894,43 +912,43 @@ test utf-7.38 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { test utf-7.39.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF0\x90\x80\x80] } 4 -test utf-7.39.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { +test utf-7.39.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF0\x90\x80\x80] } 1 test utf-7.40.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF0\x90\x80\x80] 4 } 3 -test utf-7.40.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { +test utf-7.40.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF0\x90\x80\x80] 4 } 1 test utf-7.41.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF0\x90\x80\x80] 3 } 2 -test utf-7.41.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring fullutf} { +test utf-7.41.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF0\x90\x80\x80] 3 } 1 -test utf-7.42 {Tcl_UtfPrev -- overlong sequence} testutfprev { +test utf-7.42 {Tcl_UtfPrev -- overlong sequence} {testutfprev testbytestring} { testutfprev A[testbytestring \xF0\x90\x80\x80] 2 } 1 -test utf-7.43 {Tcl_UtfPrev -- no lead byte at start} testutfprev { +test utf-7.43 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring} { testutfprev [testbytestring \xA0] } 0 -test utf-7.44 {Tcl_UtfPrev -- no lead byte at start} testutfprev { +test utf-7.44 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring} { testutfprev [testbytestring \xA0\xA0] } 1 -test utf-7.45 {Tcl_UtfPrev -- no lead byte at start} testutfprev { +test utf-7.45 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring} { testutfprev [testbytestring \xA0\xA0\xA0] } 2 test utf-7.46.0 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring ucs2} { testutfprev [testbytestring \xA0\xA0\xA0\xA0] } 3 -test utf-7.46.1 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring fullutf} { +test utf-7.46.1 {Tcl_UtfPrev -- no lead byte at start} {testutfprev testbytestring ucs4} { testutfprev [testbytestring \xA0\xA0\xA0\xA0] } 3 test utf-7.47 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} {testutfprev testbytestring} { testutfprev [testbytestring \xE8\xA0] } 0 -test utf-7.47.1 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} {testutfprev testbytestring} { +test utf-7.47.1 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} testutfprev { testutfprev \u8820 2 } 0 test utf-7.47.2 {Tcl_UtfPrev, pointing to 3th byte of 3-byte invalid sequence} {testutfprev testbytestring} { @@ -939,19 +957,19 @@ test utf-7.47.2 {Tcl_UtfPrev, pointing to 3th byte of 3-byte invalid sequence} { test utf-7.48.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF4\x8F\xBF\xBF] } 4 -test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { +test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF4\x8F\xBF\xBF] } 1 test utf-7.48.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 4 } 3 -test utf-7.48.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { +test utf-7.48.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 4 } 1 test utf-7.48.4 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 3 } 2 -test utf-7.48.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { +test utf-7.48.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF4\x8F\xBF\xBF] 3 } 1 test utf-7.48.6 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring} { @@ -960,7 +978,7 @@ test utf-7.48.6 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbyte test utf-7.49.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs2} { testutfprev A[testbytestring \xF4\x90\x80\x80] } 4 -test utf-7.49.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring fullutf} { +test utf-7.49.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring ucs4} { testutfprev A[testbytestring \xF4\x90\x80\x80] } 4 test utf-7.49.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev testbytestring} { |