summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 9e07b2a..5fefbeb 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testchmod [llength [info commands testchmod]]
testConstraint testsetplatform [llength [info commands testsetplatform]]
@@ -149,10 +149,10 @@ test cmdAH-2.6.2 {cd} -constraints {unix nonPortable} -setup {
test cmdAH-2.6.3 {Tcl_CdObjCmd, bug #3118489} -setup {
set dir [pwd]
} -returnCodes error -body {
- cd .\0
+ cd .\x00
} -cleanup {
cd $dir
-} -match glob -result "couldn't change working directory to \".\0\": *"
+} -match glob -result "couldn't change working directory to \".\x00\": *"
test cmdAH-2.7 {Tcl_ConcatObjCmd} {
concat
} {}
@@ -186,7 +186,7 @@ test cmdAH-4.5 {Tcl_EncodingObjCmd} -setup {
set system [encoding system]
} -body {
encoding system jis0208
- encoding convertto \u4e4e
+ encoding convertto 乎
} -cleanup {
encoding system $system
} -result 8C
@@ -194,7 +194,7 @@ test cmdAH-4.6 {Tcl_EncodingObjCmd} -setup {
set system [encoding system]
} -body {
encoding system iso8859-1
- encoding convertto jis0208 \u4e4e
+ encoding convertto jis0208 乎
} -cleanup {
encoding system $system
} -result 8C
@@ -211,7 +211,7 @@ test cmdAH-4.9 {Tcl_EncodingObjCmd} -setup {
encoding convertfrom 8C
} -cleanup {
encoding system $system
-} -result \u4e4e
+} -result 乎
test cmdAH-4.10 {Tcl_EncodingObjCmd} -setup {
set system [encoding system]
} -body {
@@ -219,7 +219,7 @@ test cmdAH-4.10 {Tcl_EncodingObjCmd} -setup {
encoding convertfrom jis0208 8C
} -cleanup {
encoding system $system
-} -result \u4e4e
+} -result 乎
test cmdAH-4.11 {Tcl_EncodingObjCmd} -returnCodes error -body {
encoding names foo
} -result {wrong # args: should be "encoding names"}
@@ -966,10 +966,10 @@ test cmdAH-19.11 {Tcl_FileObjCmd: exists} -constraints {unix notRoot} -setup {
} -body {
makeDirectory /tmp/tcl.foo.dir
makeFile 12345 /tmp/tcl.foo.dir/file
- file attributes /tmp/tcl.foo.dir -permissions 0000
+ file attributes /tmp/tcl.foo.dir -permissions 0
file exists /tmp/tcl.foo.dir/file
} -cleanup {
- file attributes /tmp/tcl.foo.dir -permissions 0775
+ file attributes /tmp/tcl.foo.dir -permissions 0o775
removeFile /tmp/tcl.foo.dir/file
removeDirectory /tmp/tcl.foo.dir
} -result 0
@@ -992,7 +992,7 @@ test cmdAH-19.12 {Bug 3608360: [file exists] mustn't do globbing} -setup {
catch {testsetplatform $platform}
removeFile $gorpfile
set gorpfile [makeFile "Test string" gorp.file]
-catch {file attributes $gorpfile -permissions 0765}
+catch {file attributes $gorpfile -permissions 0o765}
# avoid problems with non-local filesystems
if {[testConstraint unix] && [file exists /tmp]} {
@@ -1221,7 +1221,7 @@ test cmdAH-24.9 {Tcl_FileObjCmd: mtime touch with non-ascii chars} -setup {
set oldfile $file
} -constraints unix -body {
# introduce some non-ascii characters.
- append file \u2022
+ append file •
file delete -force $file
file rename $oldfile $file
set mtime [file mtime $file]
@@ -1246,7 +1246,7 @@ test cmdAH-24.11 {Tcl_FileObjCmd: mtime touch with non-ascii chars} -setup {
set oldfile $file
} -constraints win -body {
# introduce some non-ascii characters.
- append file \u2022
+ append file •
file delete -force $file
file rename $oldfile $file
set mtime [file mtime $file]
@@ -1408,7 +1408,7 @@ test cmdAH-27.4.1 {
catch {testsetplatform $platform}
removeFile $gorpfile
set gorpfile [makeFile "Test string" gorp.file]
-catch {file attributes $gorpfile -permissions 0765}
+catch {file attributes $gorpfile -permissions 0o765}
# stat
test cmdAH-28.1 {Tcl_FileObjCmd: stat} -returnCodes error -body {
@@ -1435,8 +1435,8 @@ test cmdAH-28.5 {Tcl_FileObjCmd: stat} -constraints {unix} -setup {
unset -nocomplain stat
} -body {
file stat $gorpfile stat
- expr {$stat(mode) & 0o777}
-} -result {501}
+ format 0o%03o [expr {$stat(mode) & 0o777}]
+} -result 0o765
test cmdAH-28.6 {Tcl_FileObjCmd: stat} {
list [catch {file stat _bogus_ stat} msg] [string tolower $msg] $errorCode
} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}}
@@ -1772,7 +1772,7 @@ unset -nocomplain platform
# Tcl_ForObjCmd is tested in for.test
-catch {file attributes $dirfile -permissions 0777}
+catch {file attributes $dirfile -permissions 0o777}
removeDirectory $dirfile
removeFile $gorpfile
# No idea how well [removeFile] copes with links...