File: core_global.t

package info (click to toggle)
liblist-maker-perl 0.005-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 188 kB
  • ctags: 11
  • sloc: perl: 225; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (4)
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
use Test::More 'no_plan';

use File::Glob;

BEGIN {
    *CORE::GLOBAL::glob = sub { return 'a'..'d'; };
}

my @overloaded = ('a'..'d');
my @unglobbed = qw( *  .* );

is_deeply [<* .*>],  \@overloaded => 'leading glob';

{
    use List::Maker;
    is_deeply [<* .*>],  \@unglobbed   => 'scoped special behaviour';
}

if ($] < 5.010) {
    is_deeply [<* .*>],  \@unglobbed   => 'trailing file-scoped';
}
else {
    is_deeply [<* .*>],  \@overloaded => 'trailing block-scoped';
}