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