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)'
;
my
$version
=
'draft7'
;
my
@warnings
= warnings {
acceptance_tests(
acceptance
=> {
specification
=>
$version
,
include_optional
=> 0,
test_dir
=>
't/additional-tests-'
.
$version
,
},
evaluator
=> {
specification_version
=>
$version
,
},
output_file
=>
$version
.
'-additional-tests.txt'
,
);
};
my
$test_sub
=
$ENV
{AUTHOR_TESTING} ?
sub
{ bag(
@_
) } :
sub
{ superbagof(
@_
) };
cmp_deeply(
\
@warnings
,
$test_sub
->(
map
+(
( re(
qr/^no-longer-supported "$_" keyword present/
) ) x (4 * (
$ENV
{NO_SHORT_CIRCUIT} ? 1 : 2)),
),
qw(id)
,
),
'got unsupported keyword warnings'
.(
$ENV
{AUTHOR_TESTING} ?
'; no unexpected warnings'
:
''
),
);
done_testing;