use
5.020;
no
autovivification
warn
=>
qw(fetch store exists delete)
;
use
if
"$]"
>= 5.022,
experimental
=>
're_strict'
;
no
if
"$]"
>= 5.031009,
feature
=>
'indirect'
;
no
if
"$]"
>= 5.033001,
feature
=>
'multidimensional'
;
no
if
"$]"
>= 5.033006,
feature
=>
'bareword_filehandles'
;
use
open
':std'
,
':encoding(UTF-8)'
;
BEGIN {
my
@variables
=
qw(AUTHOR_TESTING AUTOMATED_TESTING EXTENDED_TESTING)
;
plan
skip_all
=>
'These tests may fail if the test suite continues to evolve! They should only be run with '
.
join
(
', '
,
map
$_
.
'=1'
, head(-1,
@variables
)).
' or '
.
$variables
[-1].
'=1'
if
not
grep
$ENV
{
$_
},
@variables
;
}
if
(
$ENV
{EXTENDED_TESTING}) {
test_needs {
'Time::Moment'
=> 0,
'DateTime::Format::RFC3339'
=> 0,
'Email::Address::XS'
=>
'1.04'
,
'Data::Validate::Domain'
=> 0.13,
};
}
if
(
$ENV
{AUTHOR_TESTING}) {
}
my
$version
=
'draft6'
;
acceptance_tests(
acceptance
=> {
specification
=>
$version
,
test_subdir
=>
'optional/format'
,
},
evaluator
=> {
specification_version
=>
$version
,
collect_annotations
=> 0,
},
output_file
=>
$version
.
'-acceptance-format.txt'
,
test
=> {
$ENV
{NO_TODO} ? () : (
todo_tests
=> [
{
file
=> [
'uri-template.json'
,
!
$ENV
{AUTHOR_TESTING} && !
eval
{
require
Time::Moment; 1 } ?
'date-time.json'
: (),
!
$ENV
{AUTHOR_TESTING} && !
eval
{
require
Email::Address::XS; Email::Address::XS->VERSION(1.04); 1 } ?
'email.json'
: (),
!
$ENV
{AUTHOR_TESTING} && !
eval
{
require
Data::Validate::Domain; Data::Validate::Domain->VERSION(0.13); 1 } ?
'hostname.json'
: (),
] },
{
file
=>
'uri.json'
,
test_description
=>
'validation of URIs'
,
test_description
=>
'an invalid URI with comma in scheme'
},
] ),
},
);
END {
diag
<<DIAG
###############################
Attention CPANTesters: you do not need to file a ticket when this test fails. I will receive the test reports and act on it soon. thank you!
###############################
DIAG
if
not Test::Builder->new->is_passing;
}
done_testing;