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 | 5d67ccec007565b2ba941e8dcc11e4388323eea2 (patch) | |
tree | 0945406977c37c289a40212294f11b0e17d60329 | |
parent | e277a83fc24a8be3763f995dad1f0001ededfe51 (diff) | |
download | tcl-5d67ccec007565b2ba941e8dcc11e4388323eea2.zip tcl-5d67ccec007565b2ba941e8dcc11e4388323eea2.tar.gz tcl-5d67ccec007565b2ba941e8dcc11e4388323eea2.tar.bz2 |
Add testcases, contributed by Christian Werner. Two of them fail, so still some work to do. [d43f96c1a8]
-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 |