aboutsummaryrefslogtreecommitdiff
path: root/tests/filecopy.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/filecopy.test')
-rw-r--r--tests/filecopy.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/filecopy.test b/tests/filecopy.test
index fea3d33..0c0231e 100644
--- a/tests/filecopy.test
+++ b/tests/filecopy.test
@@ -68,6 +68,28 @@ test filecopy-2.6 "Source and target identical (-force)" {
file size tempfile
} 16
+test file-tempfile-1.1 {file tempfile - simple} {
+ set f [file tempfile]
+ set ret [file exists $f]
+ file delete $f
+ set ret
+} {1}
+
+test file-tempfile-1.2 {file tempfile with pattern} {
+ set f [file tempfile /tmp/file-tempfile.XXXXXX]
+ set ret [file exists $f]
+ file delete $f
+ set ret
+} {1}
+
+test file-tempfile-1.3 {file tempfile with invalid path} -body {
+ set f [file tempfile /doesnotexist/file-tempfile.XXXXXX]
+ puts $f
+ set ret [file exists $f]
+ file delete $f
+ set ret
+} -returnCodes error -match glob -result {/doesnotexist/file-tempfile.*}
+
file delete tempfile
file delete --force tempdir