From 4eccb160f9d1bab1684de2443aec4feb890aa52b Mon Sep 17 00:00:00 2001 From: Evan Hunter Date: Tue, 23 Feb 2016 22:22:12 +0000 Subject: Convert unnecessary usage of posix external utilities in tests to use native tcl instead --- tests/filecopy.test | 2 +- tests/filedir.test | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/filecopy.test b/tests/filecopy.test index 87fc899..fea3d33 100644 --- a/tests/filecopy.test +++ b/tests/filecopy.test @@ -69,6 +69,6 @@ test filecopy-2.6 "Source and target identical (-force)" { } 16 file delete tempfile -exec rm -rf tempdir +file delete --force tempdir testreport diff --git a/tests/filedir.test b/tests/filedir.test index 4dd78ca..b09d78f 100644 --- a/tests/filedir.test +++ b/tests/filedir.test @@ -3,12 +3,13 @@ source [file dirname [info script]]/testing.tcl needs cmd file needs cmd exec -catch { - exec rm -rf tmp - exec mkdir tmp - exec touch tmp/file - exec mkdir tmp/dir -} +cd [file dirname [info script]] + +file delete -force tmp +file mkdir tmp +file copy testio.in tmp/file +file mkdir tmp/dir + test mkdir-1.1 "Simple dir" { file mkdir tmp/abc @@ -61,8 +62,6 @@ test rmdir-2.2 "Remove non-empty dir" { catch {file delete tmp/def} } {1} -catch { - exec rm -rf tmp -} +file delete -force tmp testreport -- cgit v1.1