mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-29 12:45:20 +02:00
b2/test/sub{break,cont}: code after named and unnamed jump is handled differently
Now we handle both code paths. Should probably unify the diagnostic some day, too.
This commit is contained in:
parent
fa20078840
commit
ed8df3f94e
@ -112,7 +112,22 @@ EOF
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
tst_fail "substitutions: break inside block " -q <<EOF
|
tst_fail "substitutions: unnamed break inside block " -q <<EOF
|
||||||
|
!-s
|
||||||
|
foo = x
|
||||||
|
foo = * {
|
||||||
|
break
|
||||||
|
foo = x
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
expect <<EOF
|
||||||
|
s:4: syntax error
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
tst_fail "substitutions: nmbed break inside block " -q <<EOF
|
||||||
!-s
|
!-s
|
||||||
foo = x
|
foo = x
|
||||||
foo = * {
|
foo = * {
|
||||||
|
@ -97,7 +97,7 @@ EOF
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
tst_fail "substitutions: continue inside block" <<EOF
|
tst_fail "substitutions: unnamed continue inside block" <<EOF
|
||||||
!-s
|
!-s
|
||||||
foo = * {
|
foo = * {
|
||||||
continue
|
continue
|
||||||
@ -111,6 +111,20 @@ EOF
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
tst_fail "substitutions: named continue inside block" <<EOF
|
||||||
|
!-s
|
||||||
|
foo = * {
|
||||||
|
continue foo
|
||||||
|
bar = x
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
expect <<EOF
|
||||||
|
s:4: unreachable code
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
tst_fail "substitutions: named continue to unknown block" -q <<EOF
|
tst_fail "substitutions: named continue to unknown block" -q <<EOF
|
||||||
!-s
|
!-s
|
||||||
x = foo
|
x = foo
|
||||||
|
Loading…
Reference in New Issue
Block a user