1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-09-13 12:17:23 +03:00
eda-tools/b2/test/subign

57 lines
934 B
Plaintext
Raw Normal View History

#!/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
###############################################################################