File: prove-globbing.t

package info (click to toggle)
libtest-harness-perl 2.64-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 504 kB
  • ctags: 201
  • sloc: perl: 3,789; makefile: 45; sh: 10
file content (32 lines) | stat: -rw-r--r-- 778 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
BEGIN {
    if( $ENV{PERL_CORE} ) {
        chdir 't';
        @INC = ('../lib', 'lib');
    }
    else {
        unshift @INC, 't/lib';
    }
}

use strict;
use File::Spec;
use Test::More;
plan skip_all => "Not adapted to perl core" if $ENV{PERL_CORE};
plan skip_all => "Not installing prove" if -e "t/SKIP-PROVE";

plan tests => 1;

my $tests = File::Spec->catfile( 't', 'prove*.t' );
my $prove = File::Spec->catfile( File::Spec->curdir, "blib", "script", "prove" );
$prove = "$^X $prove";

GLOBBAGE: {
    my @actual = sort qx/$prove --dry $tests/;
    chomp @actual;

    my @expected = (
        File::Spec->catfile( "t", "prove-globbing.t" ),
        File::Spec->catfile( "t", "prove-switches.t" ),
    );
    is_deeply( \@actual, \@expected, "Expands the wildcards" );
}