summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdAH.test4
-rw-r--r--tests/encoding.test28
2 files changed, 16 insertions, 16 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 25db252..95b9f5a 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: cmdAH.test,v 1.50 2004/11/01 16:58:37 kennykb Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.51 2006/02/08 21:41:28 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -124,7 +124,7 @@ test cmdAH-4.1 {Tcl_EncodingObjCmd} {
} {1 {wrong # args: should be "encoding option ?arg ...?"}}
test cmdAH-4.2 {Tcl_EncodingObjCmd} {
list [catch {encoding foo} msg] $msg
-} {1 {bad option "foo": must be convertfrom, convertto, names, or system}}
+} {1 {bad option "foo": must be convertfrom, convertto, dirs, names, or system}}
test cmdAH-4.3 {Tcl_EncodingObjCmd} {
list [catch {encoding convertto} msg] $msg
} {1 {wrong # args: should be "encoding convertto ?encoding? data"}}
diff --git a/tests/encoding.test b/tests/encoding.test
index dc4fd8c..1de8880 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: encoding.test,v 1.23 2005/05/10 18:35:18 kennykb Exp $
+# RCS: @(#) $Id: encoding.test,v 1.24 2006/02/08 21:41:28 dgp Exp $
package require tcltest 2
namespace import -force ::tcltest::*
@@ -56,14 +56,14 @@ test encoding-2.1 {Tcl_FreeEncoding: refcount == 0} {
} {8C}
test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} {testencoding} {
set system [encoding system]
- set path [testencoding path]
+ set path [encoding dirs]
encoding system shiftjis ;# incr ref count
- testencoding path [list [pwd]]
+ encoding dirs [list [pwd]]
set x [encoding convertto shiftjis \u4e4e] ;# old one found
encoding system identity
lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg
encoding system identity
- testencoding path $path
+ encoding dirs $path
encoding system $system
set x
} "\u008c\u00c1 1 {unknown encoding \"shiftjis\"}"
@@ -88,20 +88,20 @@ test encoding-4.1 {Tcl_GetEncodingNames} {testencoding} {
makeDirectory [file join tmp encoding]
makeFile {} [file join tmp encoding junk.enc]
makeFile {} [file join tmp encoding junk2.enc]
- set path [testencoding path]
- testencoding path {}
+ set path [encoding dirs]
+ encoding dirs {}
catch {unset encodings}
catch {unset x}
foreach encoding [encoding names] {
set encodings($encoding) 1
}
- testencoding path [list [file join [pwd] encoding]]
+ encoding dirs [list [file join [pwd] encoding]]
foreach encoding [encoding names] {
if {![info exists encodings($encoding)]} {
lappend x $encoding
}
}
- testencoding path $path
+ encoding dirs $path
cd [workingDirectory]
removeFile [file join tmp encoding junk2.enc]
removeFile [file join tmp encoding junk.enc]
@@ -209,11 +209,11 @@ proc viewable {str} {
test encoding-11.1 {LoadEncodingFile: unknown encoding} {testencoding} {
set system [encoding system]
- set path [testencoding path]
+ set path [encoding dirs]
encoding system iso8859-1
- testencoding path {}
+ encoding dirs {}
set x [list [catch {encoding convertto jis0208 \u4e4e} msg] $msg]
- testencoding path $path
+ encoding dirs $path
encoding system $system
lappend x [encoding convertto jis0208 \u4e4e]
} {1 {unknown encoding "jis0208"} 8C}
@@ -234,10 +234,10 @@ test encoding-11.5.1 {LoadEncodingFile: escape file} {
} [viewable "\x1b\$B8C\x1b(B"]
test encoding-11.6 {LoadEncodingFile: invalid file} {testencoding} {
set system [encoding system]
- set path [testencoding path]
+ set path [encoding dirs]
encoding system identity
cd [temporaryDirectory]
- testencoding path [file join tmp encoding]
+ encoding dirs [file join tmp encoding]
makeDirectory tmp
makeDirectory [file join tmp encoding]
set f [open [file join tmp encoding splat.enc] w]
@@ -249,7 +249,7 @@ test encoding-11.6 {LoadEncodingFile: invalid file} {testencoding} {
removeDirectory [file join tmp encoding]
removeDirectory tmp
cd [workingDirectory]
- testencoding path $path
+ encoding dirs $path
encoding system $system
set x
} {1 {invalid encoding file "splat"}}