Root/b2/test/subend

1#!/bin/bash
2. ./Common
3
4###############################################################################
5
6tst "substitutions: unconditional end" -ds -q <<EOF
7!-s
8end
9EOF
10
11expect <<EOF
12end
13EOF
14
15#------------------------------------------------------------------------------
16
17tst "substitutions: conditional end, taken" -ds -q doit=y <<EOF
18!-s
19doit = y { end }
20foo = x
21EOF
22
23expect <<EOF
24doit=RE {
25    end
26}
27foo=x
28EOF
29
30#------------------------------------------------------------------------------
31
32tst "substitutions: conditional end, not taken" -q doit=n <<EOF
33!-s
34doit = y { end }
35foo = x
36EOF
37
38expect <<EOF
39foo=x
40EOF
41
42#------------------------------------------------------------------------------
43
44tst_fail "substitutions: code after end" -q <<EOF
45!-s
46end
47foo = x
48EOF
49
50expect <<EOF
51s:2: unreachable code
52EOF
53
54###############################################################################
55

Archive Download this file

Branches:
master



interactive