# New Ticket Created by Colin Kuskie # Please include the string: [perl #44551] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=44551 >
This test checks the block syntax in nqp.
Index: languages/nqp/t/08-blocks.t =================================================================== --- languages/nqp/t/08-blocks.t (revision 0) +++ languages/nqp/t/08-blocks.t (revision 0) @@ -0,0 +1,33 @@ +#!./parrot + +# check blocks and statement enders + +say('1..7'); + +{ + say("ok 1 # blocks are okay"); +} + +{ + print("ok "); + say("2 # last statement in a block does not need a semi-colon") +} + + +{ + say("ok 3 # statements can preceed blocks"); + { + say("ok 4 # blocks can nest"); + } + say("ok 5 # statements can follow blocks"); +} + + +{ print("ok ") }; { say("6 # multiple blocks on one line need a semi-colon") } + +{ + print("ok ") +}; { + say("7 # multiple blocks that end and start on the same line must be separated by a semi-colon") +} +