File: 03cat.t

package info (click to toggle)
pperl 0.25-5
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 296 kB
  • ctags: 40
  • sloc: perl: 868; ansic: 666; makefile: 60; sh: 23
file content (36 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (3)
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
#!perl -w
use strict;
use Test;
BEGIN { plan tests => 9 }

my $file = 't/cat.plx';
my $seed = do { open FOO, $file; local $/; <FOO> };
ok($seed);

my $foo;

$foo = `$^X t/cat.plx < $file`;
ok($foo, $seed, "straight with pipe");

$foo = `$^X t/cat.plx $file`;
ok($foo, $seed, "straight with arg");

$foo = `./pperl t/cat.plx < $file`;
ok($foo, $seed, "pperl with pipe");

$foo = `./pperl t/cat.plx $file`;
ok($foo, $seed, "pperl with arg");

$foo = `./pperl t/cat.plx < $file`;
ok($foo, $seed, "pperl with pipe2");

$foo = `./pperl t/cat.plx $file`;
ok($foo, $seed, "pperl with arg2");

$foo = `./pperl t/cat.plx < $file`;
ok($foo, $seed, "pperl with pipe3");

$foo = `./pperl t/cat.plx $file`;
ok($foo, $seed, "pperl with arg3");

system("./pperl --kill t/cat.plx");