mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-27 04:21:54 +02:00
57 lines
934 B
Bash
Executable File
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
|
|
|
|
###############################################################################
|