META
NAME
Test::META - Test that a Raku project has a good and proper META file
SYNOPSIS
This is the actual *t/030-my-meta.t* from this distribution
#!raku
use v6.c;
use Test;
use Test::META;
plan 1;
# That's it
meta-ok();
done-testing;
DESCRIPTION
This provides a simple mechanism for module authors to have some confidence that they have a working distribution META description file (as described in http://design.raku.org/S22.html#META6.json.)
It exports one subroutine *meta-ok* that runs a single sub-test that checks that:
The META file (either META6.json or META.info) exists
The META file can be parsed as valid JSON
The attributes marked as "mandatory" are present
The files mention in the "provides" section are present.
The authors field is used instead of author
The name attribute doesn't have a hyphen rather than '::'
The version exists and it isn't '*'
If the META6 file specifies a meta-version version greater than 0 that the version strings do not contain a 'v' prefix
The meta-ok
takes one optional adverb :relaxed-name
that can stop
the name check being a fail if it is intended to be like that.
There are mechanisms (used internally for testing) to over-ride the location or name of the META file and these can be seen in the test-suite, though they won't typically be needed.