aboutsummaryrefslogtreecommitdiff
path: root/tests/search/dir/testscript
blob: 29ee72e760bcc633bb2d34267359b1eb9031efe3 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# file      : tests/search/dir/testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

test.arguments = 'update(../)'

.include ../../common.testscript

# foo/ has no buildfile
# bar/ has valid buildfile
# baz/ has invalid buildfile
#
+mkdir foo bar baz
+cat <<EOI >=bar/buildfile
print bar
./:
EOI
+cat <'assert false' >=baz/buildfile

: no-buildfile
:
$* <'./: foo/' 2>>/EOE != 0
error: no explicit target for ../:dir{foo/}
EOE

: basic
:
$* <'./: bar/' >'bar'

: existing-scope
:
$* <<EOI >'bar'
bar/ x = y
./: bar/
EOI

: existing-target-implied
:
$* <<EOI >'bar'
bar/: x = y
./: bar/
EOI

: existing-target-real
:
$* <<EOI
dir{baz/}:
./: baz/
EOI