aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/status.test
blob: f1ad5bf42bc34fb5f2d5341ac727ae70854cca28 (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
# file      : tests/test/script/runner/status.tests
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

+mkdir build
+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
test = \'$test\'

# Successfull tests.
#
: eq-true
:
$c <"$* == 0";
$b

: ne-true
:
$c <"$* -s 1 != 0";
$b

# Faulty tests.
#
: eq-false
:
$c <"$* -s 1 == 0";
$b 2>>EOE != 0
testscript:1: error: ../../../driver$ext exit status 1 != 0
EOE

: ne-false
:
$c <"$* -s 1 != 1";
$b 2>>EOE != 0
testscript:1: error: ../../../driver$ext exit status 1 == 1
EOE