aboutsummaryrefslogtreecommitdiff
path: root/tests/test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test')
-rw-r--r--tests/test/script/runner/cleanup.test28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/test/script/runner/cleanup.test b/tests/test/script/runner/cleanup.test
index 61a66b4..200beb9 100644
--- a/tests/test/script/runner/cleanup.test
+++ b/tests/test/script/runner/cleanup.test
@@ -18,7 +18,7 @@ c = cat >>>testscript
#
# @@ TODO: $c <"$* -f a &a" && $b
#
-: files
+: file
:
$c <"$* -f a &a";
$b
@@ -29,14 +29,17 @@ $c <"$* -d a &a/";
$b
: dir2
+:
$c <"$* -d a/b &a/ &a/b/";
$b
: file-dir
+:
$c <"$* -d a/b -f a/b/c &a/ &a/b/ &a/b/c";
$b
: wildcard1
+:
$c <"$* -d a/b -f a/b/c &a/***";
$b
@@ -46,10 +49,12 @@ $c <"$* &a/***";
$b
: file-dup
+:
$c <"$* -f a &a &a";
$b
: dir-dup
+:
$c <"$* -d a/b &a/ &a/b/ &a/b/../b/";
$b
@@ -62,6 +67,13 @@ $b 2>>EOE != 0
testscript:1: error: registered for cleanup file test/1/a does not exist
EOE
+: file-out-wd
+:
+$c <"$* &../a";
+$b 2>>EOE != 0
+testscript:1: error: registered for cleanup file test/a is out of working directory test/1/
+EOE
+
: dir-not-exists
:
$c <"$* &a/";
@@ -69,6 +81,13 @@ $b 2>>EOE != 0
testscript:1: error: registered for cleanup directory test/1/a/ does not exist
EOE
+: dir-out-wd
+:
+$c <"$* &../a/";
+$b 2>>EOE != 0
+testscript:1: error: registered for cleanup directory test/a/ is out of working directory test/1/
+EOE
+
: dir-not-empty1
:
$c <"$* -d a/b -f a/b/c";
@@ -110,3 +129,10 @@ $c <"$* -f a &a/";
$b 2>>EOE != 0
error: unable to remove directory test/1/a/: Not a directory
EOE
+
+: wildcard-out-wd
+:
+$c <"$* &../a/***";
+$b 2>>EOE != 0
+testscript:1: error: registered for cleanup wildcard test/a/*** is out of working directory test/1/
+EOE