aboutsummaryrefslogtreecommitdiff
path: root/tests/filecopy.test
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2013-11-07 08:21:36 +1000
committerSteve Bennett <steveb@workware.net.au>2013-11-07 08:26:52 +1000
commit93acd70060fae15b0985c74991486f2d68d468b2 (patch)
tree618028e1d90e444d551923c091d1bc9d466997c2 /tests/filecopy.test
parenta077f0800f5bbc7ca5f3b368726f7d1757c16549 (diff)
downloadjimtcl-93acd70060fae15b0985c74991486f2d68d468b2.zip
jimtcl-93acd70060fae15b0985c74991486f2d68d468b2.tar.gz
jimtcl-93acd70060fae15b0985c74991486f2d68d468b2.tar.bz2
file copy -force handles identical source/target
No longer truncates the file Reported-by: sg0x40 <https://github.com/sg0x40> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/filecopy.test')
-rw-r--r--tests/filecopy.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/filecopy.test b/tests/filecopy.test
index d64a2d9..084beec 100644
--- a/tests/filecopy.test
+++ b/tests/filecopy.test
@@ -63,6 +63,11 @@ test filecopy-2.5 "Source doesn't exist and can't write to target (-force)" {
list [catch {file copy -force missing tempdir} msg] $msg
} {1 {missing: No such file or directory}}
+test filecopy-2.6 "Source and target identical (-force)" {
+ file copy -force tempfile tempfile
+ file size tempfile
+} 16
+
file delete tempfile
exec rm -rf tempdir