From 182e820765d09297345ddfc7a41a64cdd883989c Mon Sep 17 00:00:00 2001 From: pmichaud Date: Thu, 22 Oct 2009 20:48:37 -0500 Subject: [PATCH] [nqp]: Somehow missed adding these tests in earlier commits. --- t/nqp/00-literals.t | 20 ++++++++++++++++++++ t/nqp/01-if.t | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 t/nqp/00-literals.t create mode 100644 t/nqp/01-if.t diff --git a/t/nqp/00-literals.t b/t/nqp/00-literals.t new file mode 100644 index 0000000..e0d9e85 --- /dev/null +++ b/t/nqp/00-literals.t @@ -0,0 +1,20 @@ +#!./parrot nqp.pbc + +# check literals + +say('1..8'); + +print("ok "); +print(1); +print("\n"); + +print('ok '); +say(2); + +print("ok 3\n"); +say('ok 4'); +say("ok 5"); +say(q); +say(q ); + +say("\x6f\x6b 8"); diff --git a/t/nqp/01-if.t b/t/nqp/01-if.t new file mode 100644 index 0000000..e31d7ae --- /dev/null +++ b/t/nqp/01-if.t @@ -0,0 +1,19 @@ +#! nqp + +# check control structure 'if' + +say('1..4'); + +if 1 { say("ok 1 # on one line"); } + +say("ok 2 # statements following if are okay"); + +if 1 { + say("ok 3 # multi-line if"); +} + +if 0 { + print("not "); +} + +say("ok 4 # multi-line if, false condition causes block not to execute");