1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-30 08:56:13 +02:00
eda-tools/b2/test/subign
2012-06-03 21:22:16 -03:00

57 lines
934 B
Bash
Executable File

#!/bin/bash
. ./Common
###############################################################################
tst "substitutions: unconditional ignore" -ds -q <<EOF
!-s
ignore
EOF
expect <<EOF
ignore
ignore
EOF
#------------------------------------------------------------------------------
tst "substitutions: conditional ignore, taken" -ds -q doit=y <<EOF
!-s
doit = y { ignore }
foo = x
EOF
expect <<EOF
doit=RE {
ignore
}
foo=x
ignore
EOF
#------------------------------------------------------------------------------
tst "substitutions: conditional ignore, not taken" -q doit=n <<EOF
!-s
doit = y { ignore }
foo = x
EOF
expect <<EOF
foo=x
EOF
#------------------------------------------------------------------------------
tst_fail "substitutions: code after ignore" -q <<EOF
!-s
ignore
foo = x
EOF
expect <<EOF
s:2: unreachable code
EOF
###############################################################################