This repository has been archived by the owner on Feb 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nqp]: Somehow missed adding these tests in earlier commits.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<ok 6>); | ||
say(q <ok 7>); | ||
|
||
say("\x6f\x6b 8"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); |