diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-15 07:48:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-15 07:48:54 (GMT) |
commit | 5eba4fa4d73e7249d46af537a2d631f6799f8f11 (patch) | |
tree | 0945406977c37c289a40212294f11b0e17d60329 /tests | |
parent | 0d7614dd81f9fba7b15f5d1e3fc174b6d1e8038d (diff) | |
download | tcl-5eba4fa4d73e7249d46af537a2d631f6799f8f11.zip tcl-5eba4fa4d73e7249d46af537a2d631f6799f8f11.tar.gz tcl-5eba4fa4d73e7249d46af537a2d631f6799f8f11.tar.bz2 |
Add testcases, contributed by Christian Werner. Two of them fail, so still some work to do. [d43f96c1a8]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/string.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/string.test b/tests/string.test index 3775c0d..62bc062 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1897,6 +1897,33 @@ test string-21.15.$noComp {string wordend, unicode} -body { test string-21.16.$noComp {string wordend, unicode} -constraints utf16 -body { run {string wordend "\U1D7CA\U1D7CA abc" 10} } -result 8 +test string-21.17 {string trim, unicode} knownBug { + string trim "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD83D\uDE02 +} "Hello world!" +test string-21.18 {string trimleft, unicode} { + string trimleft "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD83D\uDE02 +} "Hello world!\uD83D\uDE02" +test string-21.19 {string trimright, unicode} knownBug { + string trimright "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD83D\uDE02 +} "\uD83D\uDE02Hello world!" +test string-21.20 {string trim, unicode} { + string trim "\uF602Hello world!\uF602" \uD83D\uDE02 +} "\uF602Hello world!\uF602" +test string-21.21 {string trimleft, unicode} { + string trimleft "\uF602Hello world!\uF602" \uD83D\uDE02 +} "\uF602Hello world!\uF602" +test string-21.22 {string trimright, unicode} { + string trimright "\uF602Hello world!\uF602" \uD83D\uDE02 +} "\uF602Hello world!\uF602" +test string-21.23 {string trim, unicode} { + string trim "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD93D\uDE02 +} "\uD83D\uDE02Hello world!\uD83D\uDE02" +test string-21.24 {string trimleft, unicode} { + string trimleft "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD93D\uDE02 +} "\uD83D\uDE02Hello world!\uD83D\uDE02" +test string-21.25 {string trimright, unicode} { + string trimright "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD93D\uDE02 +} "\uD83D\uDE02Hello world!\uD83D\uDE02" test string-22.1.$noComp {string wordstart} -body { list [catch {run {string word a}} msg] $msg |