From bd6ebe8c2ca359fb201b84d9004b650d943b4d51 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 31 Oct 2016 12:06:24 +0200 Subject: Implement testscript working directory cleanup --- tests/test/script/integration/testscript | 38 ++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) (limited to 'tests') 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; -$* <>EOE != 0; +touch foo.test &foo.test; #@@ TMP +touch test &test; #@@ TMP +$* <>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. +$* <>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. +$* <>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/ -- cgit v1.1