| 1 |
# vim: set ts=8 sts=2 sw=2 tw=100 et : |
| 2 |
use strict; |
| 3 |
use warnings; |
| 4 |
use strictures 2; |
| 5 |
use stable 0.031 'postderef'; |
| 6 |
use experimental 'signatures'; |
| 7 |
no autovivification warn => qw(fetch store exists delete); |
| 8 |
use if "$]" >= 5.022, experimental => 're_strict'; |
| 9 |
no if "$]" >= 5.031009, feature => 'indirect'; |
| 10 |
no if "$]" >= 5.033001, feature => 'multidimensional'; |
| 11 |
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
| 12 |
no if "$]" >= 5.041009, feature => 'smartmatch'; |
| 13 |
|
| 14 |
use Test2::V0 qw(!bag !bool), -no_pragmas => 1; |
| 15 |
use if $ENV{AUTHOR_TESTING}, 'Test2::Warnings'; |
| 16 |
use Test::JSON::Schema::Acceptance; |
| 17 |
|
| 18 |
use lib 't/lib'; |
| 19 |
use Helper; |
| 20 |
|
| 21 |
my $accepter = Test::JSON::Schema::Acceptance->new( |
| 22 |
test_dir => 't/tests/include_optional', |
| 23 |
include_optional => 1, |
| 24 |
); |
| 25 |
|
| 26 |
cmp_result( |
| 27 |
$accepter->_test_data, |
| 28 |
[ |
| 29 |
{ file => str('foo.json'), json => ignore }, |
| 30 |
{ file => str('zulu.json'), json => ignore }, |
| 31 |
{ file => str('extra/foo.json'), json => ignore }, |
| 32 |
{ file => str('optional/alpha.json'), json => ignore }, |
| 33 |
{ file => str('optional/beta.json'), json => ignore }, |
| 34 |
], |
| 35 |
'picked up optional files in test_data, in the correct order', |
| 36 |
); |
| 37 |
|
| 38 |
done_testing; |