5deda8469d830b659a8795e8d47545eeebc9da99
[urisagit/Perl-Docs.git] / t / pseudo.t
1 #!/usr/local/bin/perl -w
2
3 use strict ;
4
5 use File::Slurp ;
6 use Carp ;
7 use Test::More ;
8
9 plan( tests => 1 ) ;
10
11 my $proc_file = "/proc/$$/auxv" ;
12
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
27 #print "LEN: ", length $data_do, "\n" ;
28
29         my $data_slurp = read_file( $proc_file ) ;
30 #print "LEN2: ", length $data_slurp, "\n" ;
31 #print "LEN3: ", -s $proc_file, "\n" ;
32
33         is( $data_do, $data_slurp, 'pseudo' ) ;
34 }