Skip to content

Commit 98c1c26

Browse files
committed
Add license field to META6.json
also write a test that META6.json is a valid JSON file. Hey, we have a JSON parser right there, why not use it? Closes #29.
1 parent 32c43c0 commit 98c1c26

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

META6.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"version" : "*",
55
"description" : "A minimal JSON (de)serializer",
66
"depends" : [ ],
7+
"license": "Artistic-2.0",
78
"provides" : {
89
"JSON::Tiny" : "lib/JSON/Tiny.pm",
910
"JSON::Tiny::Actions" : "lib/JSON/Tiny/Actions.pm",

t/06-meta-valid.t

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
use v6;
2+
use Test;
3+
4+
use JSON::Tiny;
5+
6+
my $contents = slurp 'META6.json';
7+
ok $contents, 'can read META6.json';
8+
my %decoded;
9+
lives-ok {
10+
%decoded = from-json($contents);
11+
}, 'can decode META6.json';
12+
13+
ok %decoded, 'META6.json is not empty';
14+
for <perl name description license provides source-url> -> $key {
15+
ok %decoded{$key}.defined, "key $key present";
16+
}
17+
18+
done-testing;

0 commit comments

Comments
 (0)