#!./parrot

# check control structure 'if ... else'

say('1..4');

if 1 { say("ok 1 # on one line with else"); } else { say("not ok 1 # on one line with else")}

say("ok 2 # statements following if with else are okay");

if 1 {
    print("ok 3");
}
else {
    print("not ok 3");
}
say(" # multi-line if with else");

if 0 {
    print("not ok 4");
}
else {
    print("ok 4");
}
say(" # multi-line if, else branch");

#!./parrot

# check control structure 'if ... else'

say('1..7');

if 1 { say("ok 1 # on one line with else"); } else { say("not ok 1 # on one line with else")}

say("ok 2 # statements following if with else are okay");

if 1 {
    print("ok 3");
}
else {
    print("not ok 3");
}
say(" # multi-line if with else");

if 0 {
    print("not ok 4");
}
else {
    print("ok 4");
}
say(" # multi-line if, else branch");

if 0 {
}
else {
    print("ok 5");
}
say(" # empty if-block");

if 0 {
    print("not ok 6");
}
else {
}
print("ok 6");
say(" # empty else-block");

if 0 {
}
else {
}
print("ok 7");
say(" # empty if- and else-block");

Add tests with empty if- and else-blocks
[nqp]
Add tests with empty if- and else-blocks


git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@23416 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
