Upgrade to Test::Harness 2.46
[p5sagit/p5-mst-13.2.git] / lib / Test / Harness / t / prove-globbing.t
1 BEGIN {
2     if( $ENV{PERL_CORE} ) {
3         chdir 't';
4         @INC = ('../lib', 'lib');
5     }
6     else {
7         unshift @INC, 't/lib';
8     }
9 }
10
11 use strict;
12 use File::Spec;
13 use Test::More;
14 plan skip_all => "Not adapted to perl core" if $ENV{PERL_CORE};
15 plan skip_all => "Not installing prove" if -e "t/SKIP-PROVE";
16
17 plan tests => 1;
18
19 my $prove = File::Spec->catfile( File::Spec->curdir, "blib", "script", "prove" );
20 my $tests = File::Spec->catfile( 't', 'prove*.t' );
21
22 GLOBBAGE: {
23     my @actual = sort qx/$prove --dry $tests/;
24     chomp @actual;
25
26     my @expected = (
27         File::Spec->catfile( "t", "prove-globbing.t" ),
28         File::Spec->catfile( "t", "prove-switches.t" ),
29     );
30     is_deeply( \@actual, \@expected, "Expands the wildcards" );
31 }