aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/cleanup.test
blob: 9a660d5f983c4acb087f0747a503d9935dbbab67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# file      : tests/test/script/runner/cleanup.test
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

+mkdir build &build/ # @@ Should not be necessary once builtin.
+cat <<EOI >>>build/boostrap.build
project = test
amalgamation =

using test
EOI

b = $build.driver -q --no-column --buildfile - <"./: test{testscript}" \
  &test/ test
c = cat >>>testscript

$* -f a &a                                       # file
$* -d a &a/                                      # dir1
$* -d a/b &a/ &a/b/                              # dir2
$* -d a/b -f a/b/c &a/ &a/b/ &a/b/c              # file-dir
$* -f a &a &a                                    # file-dup
$* -d a/b &a/ &a/b/ &a/b/../b/                   # dir-dup

# <test-id>
#
# @@ TODO: $c <"$* &a/" && $b 2>>EOE
$c <"$* &a/";
$b 2>>EOE != 0
testscript:1: error: registered for cleanup directory test/1/a/ does not exist
EOE