Skip to content

Commit

Permalink
[TESTS] Add 02-load-all.t to test loading required modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoffrey Broadwell committed Dec 23, 2009
1 parent dfc7b7b commit f8b2fdc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions t/02-load-all.t
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'");
}
}
}

0 comments on commit f8b2fdc

Please sign in to comment.