mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-23 19:45:31 +02:00
55 lines
890 B
Plaintext
55 lines
890 B
Plaintext
|
#!/bin/bash
|
||
|
. ./Common
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
tst "substitutions: unconditional end" -ds -q <<EOF
|
||
|
!-s
|
||
|
end
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
end
|
||
|
EOF
|
||
|
|
||
|
#------------------------------------------------------------------------------
|
||
|
|
||
|
tst "substitutions: conditional end, taken" -ds -q doit=y <<EOF
|
||
|
!-s
|
||
|
doit = y { end }
|
||
|
foo = x
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
doit=RE {
|
||
|
end
|
||
|
}
|
||
|
foo=x
|
||
|
EOF
|
||
|
|
||
|
#------------------------------------------------------------------------------
|
||
|
|
||
|
tst "substitutions: conditional end, not taken" -q doit=n <<EOF
|
||
|
!-s
|
||
|
doit = y { end }
|
||
|
foo = x
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
foo=x
|
||
|
EOF
|
||
|
|
||
|
#------------------------------------------------------------------------------
|
||
|
|
||
|
tst_fail "substitutions: code after end" -q <<EOF
|
||
|
!-s
|
||
|
end
|
||
|
foo = x
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
s:2: unreachable code
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|