4 chdir 't' and @INC = '../lib' if $ENV{PERL_CORE};
10 use TAP::Parser::Utils qw( split_shell );
14 { name => 'Bare words',
15 in => 'bare words are here',
16 out => [ 'bare', 'words', 'are', 'here' ],
18 { name => 'Single quotes',
19 in => "'bare' 'words' 'are' 'here'",
20 out => [ 'bare', 'words', 'are', 'here' ],
22 { name => 'Double quotes',
23 in => '"bare" "words" "are" "here"',
24 out => [ 'bare', 'words', 'are', 'here' ],
27 in => '\ "ba\"re" \'wo\\\'rds\' \\\\"are" "here"',
28 out => [ ' ', 'ba"re', "wo'rds", '\\are', 'here' ],
31 in => '-e "system(shift)"',
32 out => [ '-e', 'system(shift)' ],
56 plan tests => 1 * @schedule;
58 for my $test (@schedule) {
59 my $name = $test->{name};
60 my @got = split_shell( $test->{in} );
61 unless ( is_deeply \@got, $test->{out}, "$name: parse OK" ) {
63 diag( Dumper( { want => $test->{out}, got => \@got } ) );