Skip to content

Commit ce40ec8

Browse files
committed
Test for some sanity with all the modules.
1 parent 0f20385 commit ce40ec8

File tree

2 files changed

+11663
-0
lines changed

2 files changed

+11663
-0
lines changed

t/040-projects.t

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!perl6
2+
3+
use v6;
4+
5+
use Test;
6+
use META6;
7+
8+
my constant Projects = Array[META6] but JSON::Class;
9+
10+
my IO::Path $data-dir = $*PROGRAM.parent.child("data");
11+
my IO::Path $meta-path = $data-dir.child('projects.json');
12+
13+
my $json = $meta-path.slurp;
14+
15+
say Projects ~~ Positional;
16+
say Projects.of;
17+
18+
my $projects;
19+
20+
{
21+
CONTROL {
22+
when CX::Warn {
23+
$_.resume;
24+
}
25+
};
26+
lives-ok { $projects = Projects.from-json($json) }, "create an object from projects.json";
27+
ok all($projects.list) ~~ META6, "and they're all META6 objects";
28+
}
29+
30+
31+
32+
33+
done-testing;
34+
# vim: expandtab shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)