aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/integration/testscript
blob: e98a25cc3147e3a2842d81f16c6435b4356c4e13 (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
50
51
52
53
54
55
56
57
58
59
# file      : tests/test/script/integration/testscript
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

test.options += --buildfile -
test.arguments = test

+mkdir build
#+cat <<EOI >>>build/boostrap.build
#project = test
#amalgamation =
#
#using test
#EOI
+cp $src_base/bootstrap.build build/

# @@ TODO: redo as scope.
#
touch testscript foo.test bar.test;
$* <<EOI 2>>EOE != 0;
./: test{testscript foo}
EOI
error: both 'testscript' and other names specified for dir{./}
info: while testing dir{./}
EOE
$* <<EOI 2>>EOE != 0;
./: test{foo testscript}
EOI
error: both 'testscript' and other names specified for dir{./}
info: while testing dir{./}
EOE
$* <<EOI 2>>EOE;
./: test{foo bar}
EOI
test dir{./} with test{foo}
test dir{./} with test{bar}
EOE
rm -f testscript foo.test bar.test

# work-dir-not-empty-begin
#
touch foo.test;
mkdir test;
touch test/dummy;
$* <<EOI 2>>EOE != 0;
./: test{foo}
EOI
error: working directory test/ is not empty at the beginning of the test
info: while testing dir{./}
EOE
rm -f test/dummy foo.test;
rmdir test

# work-dir-not-empty-end
#
# @@ No (easy) way to test this.

-rm -f build/bootstrap.build
-rmdir build/