aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-10-31 18:05:20 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:36 +0200
commit4876a5f56c72f64a54627f9b6d0656878b7ca547 (patch)
tree083e640047efc5c3d694f848ac8c9f85f50d53e4 /tests
parent1f7ab003ff8f14279ba69f9614e63b77bb35a8b6 (diff)
Check if registered for cleanup path is in test scope working directory
Diffstat (limited to 'tests')
-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