summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-02-12 11:04:16 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-02-12 11:04:16 (GMT)
commitbf448a6421c4fd0340d6bba70aba3b0a713d049b (patch)
tree6d45ababc6bd6d2dcb3646760ebd8019a6076a3b /tests/cmdAH.test
parentb5095134dfebce7a33739c75d6533d90862901e3 (diff)
downloadtcl-bf448a6421c4fd0340d6bba70aba3b0a713d049b.zip
tcl-bf448a6421c4fd0340d6bba70aba3b0a713d049b.tar.gz
tcl-bf448a6421c4fd0340d6bba70aba3b0a713d049b.tar.bz2
Added 'encoding profiles'
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 7b2d99f..c666513 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -178,6 +178,7 @@ set "numargErrors(encoding system)" {^wrong # args: should be "(encoding |::tcl:
set "numargErrors(encoding convertfrom)" {^wrong # args: should be "(encoding |::tcl::encoding::)convertfrom \?\?-profile profile\? \?-failindex var\? \?encoding\?\? data"$}
set "numargErrors(encoding convertto)" {^wrong # args: should be "(encoding |::tcl::encoding::)convertto \?\?-profile profile\? \?-failindex var\? \?encoding\?\? data"$}
set "numargErrors(encoding names)" {wrong # args: should be "encoding names"}
+set "numargErrors(encoding profiles)" {wrong # args: should be "encoding profiles"}
set encProfiles {tcl8 strict replace}
@@ -202,6 +203,7 @@ set encValidStrings {
set encInvalidBytes {
ascii \x41\xe9\x42 default A\u00E9B -1 {non-ASCII}
ascii \x41\xe9\x42 tcl8 A\u00E9B -1 {non-ASCII}
+ ascii \x41\xe9\x42 replace A\uFFFDB -1 {non-ASCII}
ascii \x41\xe9\x42 strict A 1 {non-ASCII}
utf-8 \x41\xC0\x42 default A\u00C0B -1 C0
@@ -565,6 +567,13 @@ test cmdAH-4.5.2 {encoding names should include at least utf-8 and iso8859-1 and
} -result {1 1 1}
#
+# encoding profiles 4.6.*
+badnumargs cmdAH-4.6.1 {encoding profiles} {foo}
+test cmdAH-4.6.2 {encoding profiles} -body {
+ lsort [encoding profiles]
+} -result {replace strict tcl8}
+
+#
# file command
test cmdAH-5.1 {Tcl_FileObjCmd} -returnCodes error -body {