File: from_stdin.t

package info (click to toggle)
libfile-next-perl 1.18-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 260 kB
  • sloc: perl: 996; ansic: 21; makefile: 3; javascript: 2
file content (43 lines) | stat: -rw-r--r-- 833 bytes parent folder | download | duplicates (6)
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
33
34
35
36
37
38
39
40
41
42
43
#!perl

use strict;
use warnings;
use Test::More tests => 2;

use lib 't';
use Util;

my $CAT = "$^X -pe1";

my @expected = qw(
    t/00-load.t
    t/api.t
    t/basic.t
    t/dirs.t
    t/dot.t
    t/everything.t
    t/follow.t
    t/from_file.t
    t/methods.t
    t/named-pipe.t
    t/parms.t
    t/pod-coverage.t
    t/pod.t
    t/sort.t
    t/swamp/perl-test.t
    t/zero.t
);

FROM_STDIN: {
    # Pipe stuff into the iterator
    my @actual = `$CAT t/filelist.txt | $^X -Mblib t/stdin-iterator.pl`;
    chomp @actual;
    sets_match( \@actual, \@expected, 'FROM_STDIN' );
}

FROM_STDIN_NUL: {
    # Pipe nul-separated stuff into the iterator that handles nul-separated
    my @actual = `$CAT t/filelist-nul.txt | $^X -Mblib t/stdin-iterator.pl 1`;
    chomp @actual;
    sets_match( \@actual, \@expected, 'FROM_STDIN_NUL' );
}