From 4876a5f56c72f64a54627f9b6d0656878b7ca547 Mon Sep 17 00:00:00 2001
From: Karen Arutyunov <karen@codesynthesis.com>
Date: Mon, 31 Oct 2016 18:05:20 +0300
Subject: Check if registered for cleanup path is in test scope working
 directory

---
 tests/test/script/runner/cleanup.test | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

(limited to 'tests/test')

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
-- 
cgit v1.1