We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f20385 commit ce40ec8Copy full SHA for ce40ec8
t/040-projects.t
@@ -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