diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-05-17 08:09:29 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-05-17 08:09:29 (GMT) |
commit | cbd3fd20bd2ade1a59cde97cfa4e2b112f88445a (patch) | |
tree | 953fe26f009a15137cac57cb462836778c747817 /tests/cmdAH.test | |
parent | c54b6957b8f0577a8d2789b9cc88a04a7da7a478 (diff) | |
download | tcl-cbd3fd20bd2ade1a59cde97cfa4e2b112f88445a.zip tcl-cbd3fd20bd2ade1a59cde97cfa4e2b112f88445a.tar.gz tcl-cbd3fd20bd2ade1a59cde97cfa4e2b112f88445a.tar.bz2 |
Add test for what happens when the directory in the template doesn't exist; doc it too.
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r-- | tests/cmdAH.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 789e77a..f8ab361 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -1698,6 +1698,22 @@ test cmdAH-33.5 {file tempdir} -setup { } -match glob -result {GORP:/gorp_* 1 directory {} {}} -cleanup { catch {file delete -force $base} } +test cmdAH-33.6 {file tempdir: missing parent dir} -setup { + set base [file join [temporaryDirectory] gorp] + file mkdir $base +} -returnCodes error -body { + file tempdir $base/quux/ +} -cleanup { + catch {file delete -force $base} +} -result {can't create temporary directory: no such file or directory} +test cmdAH-33.7 {file tempdir: missing parent dir} -setup { + set base [file join [temporaryDirectory] gorp] + file mkdir $base +} -returnCodes error -body { + file tempdir $base/quux/foobar +} -cleanup { + catch {file delete -force $base} +} -result {can't create temporary directory: no such file or directory} # This shouldn't work, but just in case a test above failed... catch {close $newFileId} |