Commit | Line | Data |
635c7876 |
1 | #!/usr/local/bin/perl -w |
2 | |
3 | use strict ; |
4 | |
5 | use Carp ; |
6 | use Test::More ; |
7 | |
8 | plan( tests => 1 ) ; |
9 | |
10 | my $proc_file = "/proc/$$/auxv" ; |
11 | |
12 | BEGIN{ |
13 | use_ok( 'File::Slurp' ) ; |
14 | } |
15 | |
16 | SKIP: { |
17 | |
18 | unless ( -r $proc_file ) { |
19 | |
20 | skip "can't find pseudo file $proc_file", 1 ; |
21 | } |
22 | |
23 | test_pseudo_file() ; |
24 | } |
25 | |
26 | sub test_pseudo_file { |
27 | |
28 | my $data_do = do{ local( @ARGV, $/ ) = $proc_file; <> } ; |
29 | |
30 | my $data_slurp = read_file( $proc_file ) ; |
31 | |
32 | is( $data_do, $data_slurp, 'pseudo' ) ; |
33 | } |