diff options
author | vincentdarley <vincentdarley> | 2003-01-09 10:38:28 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2003-01-09 10:38:28 (GMT) |
commit | 148ced9ceeadb0fede7d548f209c3ade2af8291b (patch) | |
tree | 94e33d4bbeedca7ca6ecf8cead2a25e077246a54 /tests/cmdAH.test | |
parent | f98b2e353536358f9a36a52cb3a593b6958b9666 (diff) | |
download | tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.zip tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.tar.gz tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.tar.bz2 |
non-ascii chars in file mtime fix
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r-- | tests/cmdAH.test | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 51667fb..fe16def 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.29 2002/07/11 08:25:24 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.30 2003/01/09 10:38:32 vincentdarley Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1369,6 +1369,22 @@ test cmdAH-24.8 {Tcl_FileObjCmd: mtime touch} { set modmtime [file mtime $file $newmtime] expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"} } 1 +test cmdAH-24.9 {Tcl_FileObjCmd: mtime touch with non-ascii chars} { + set oldfile $file + # introduce some non-ascii characters. + append file \u2022 + file delete -force $file + file rename $oldfile $file + set mtime [file mtime $file] + after 1100; # pause a sec to notice change in mtime + set newmtime [clock seconds] + set err [catch {file mtime $file $newmtime} modmtime] + file rename $file $oldfile + if {$err} { + error $modmtime + } + expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"} +} 1 removeFile touch.me # owned |