aboutsummaryrefslogtreecommitdiff
path: root/tests/test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-31 12:06:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:36 +0200
commitbd6ebe8c2ca359fb201b84d9004b650d943b4d51 (patch)
tree8012400544cea13ffc422e915363fb78286d8eb2 /tests/test
parentea84c30622ea265b38ec7235c707f8b75df78b16 (diff)
Implement testscript working directory cleanup
Diffstat (limited to 'tests/test')
-rw-r--r--tests/test/script/integration/testscript38
1 files changed, 29 insertions, 9 deletions
diff --git a/tests/test/script/integration/testscript b/tests/test/script/integration/testscript
index 27c1a5d..658a6dc 100644
--- a/tests/test/script/integration/testscript
+++ b/tests/test/script/integration/testscript
@@ -36,22 +36,42 @@ EOI
-rm -f testscript foo.test bar.test
}
-# work-dir-not-empty-begin
+# work-dir-file
#
-touch foo.test;
-mkdir test;
-touch test/dummy;
-$* <<EOI 2>>EOE != 0;
+touch foo.test &foo.test; #@@ TMP
+touch test &test; #@@ TMP
+$* <<EOI 2>>EOE != 0
./: test{foo}
EOI
-error: working directory test/ is not empty at the beginning of the test
+error: working directory test/ is a file/symlink
+EOE
+
+# work-dir-exists
+#
+touch foo.test &foo.test; #@@ TMP
+mkdir test; #@@ Need a way to ignore/deregister cleanup.
+$* <<EOI 2>>EOE
+./: test{foo}
+EOI
+warning: working directory test/ exists at the beginning of the test
+EOE
+
+# work-dir-not-empty
+#
+touch foo.test &foo.test; #@@ TMP
+mkdir test; #@@ Need a way to ignore/deregister cleanup.
+touch test/dummy; #@@ Need a way to ignore/deregister cleanup.
+$* <<EOI 2>>EOE
+./: test{foo}
+EOI
+warning: working directory test/ exists and is not empty at the beginning \
+of the test
EOE
-rm -f test/dummy foo.test;
-rmdir test
# work-dir-not-empty-end
#
-# @@ No (easy) way to test this.
+# @@ No (easy) way to test this. Maybe if the inner test creates something
+# without cleanup?
-rm -f build/bootstrap.build
-rmdir build/