diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-06-01 08:47:13 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-06-05 21:13:11 +1000 |
commit | 7dbb01f6ca673f3b46231215695c848ffbee3989 (patch) | |
tree | 01dde8330cd75ed62fb5b29132bd5d0009310a1a /tests/string.test | |
parent | d4cd7cabc6359bf5e1af8ce0219e621ae0ec3d86 (diff) | |
download | jimtcl-7dbb01f6ca673f3b46231215695c848ffbee3989.zip jimtcl-7dbb01f6ca673f3b46231215695c848ffbee3989.tar.gz jimtcl-7dbb01f6ca673f3b46231215695c848ffbee3989.tar.bz2 |
core: string match and other glob matching support embedded nulls
string match, switch -glob, info commands, etc. all now support
patterns and strings with embedded nulls.
Fixes #143
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/string.test')
-rw-r--r-- | tests/string.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/string.test b/tests/string.test index e9d5399..5a22229 100644 --- a/tests/string.test +++ b/tests/string.test @@ -696,6 +696,17 @@ test string-11.50 {string match, *special case} tcl { string match "\\" "\\" } 0 +test string-11.51 {string match, nulls in pattern} { + string match "abc\0def" "abc\0def" +} 1 + +test string-11.52 {string match, nulls in pattern} { + string match "abc*\0def" "abcghi\0def" +} 1 + +test string-11.53 {string match, nulls in pattern} { + string match "abc\[ghi\0]def" "abc\0def" +} 1 test string-12.1 {string range} { list [catch {string range} msg] |