-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TESTS] Add 02-load-all.t to test loading required modules
- Loading branch information
Geoffrey Broadwell
committed
Dec 23, 2009
1 parent
dfc7b7b
commit f8b2fdc
Showing
1 changed file
with
42 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,42 @@ | ||
#! parrot-nqp | ||
|
||
MAIN(); | ||
|
||
sub MAIN () { | ||
# Load testing tools | ||
pir::load_language('parrot'); | ||
pir::compreg__PS('parrot').import('Test::More'); | ||
|
||
# Run all component loading tests | ||
run_tests(); | ||
} | ||
|
||
sub run_tests () { | ||
plan(10); | ||
|
||
test_load_pbcs(); | ||
} | ||
|
||
sub test_load_pbcs() { | ||
my @pbcs := < | ||
config.pbc | ||
dumper.pbc | ||
Config/JSON.pbc | ||
Getopt/Obj.pbc | ||
P6object.pbc | ||
P6Regex.pbc | ||
src/lib/Util.pbc | ||
src/lib/Plumage/Metadata.pbc | ||
src/lib/Plumage/Dependencies.pbc | ||
src/lib/Plumage/Project.pbc | ||
>; | ||
|
||
for @pbcs -> $pbc { | ||
pir::load_bytecode($pbc); | ||
|
||
ok(1, "success loading '$pbc'"); | ||
CATCH { | ||
ok(0, "FAILED TO LOAD '$pbc'"); | ||
} | ||
} | ||
} |