mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-30 07:47:10 +02:00
57 lines
934 B
Plaintext
57 lines
934 B
Plaintext
|
#!/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
|
||
|
|
||
|
###############################################################################
|