summaryrefslogtreecommitdiff
path: root/t/pseudo.t
blob: 5deda8469d830b659a8795e8d47545eeebc9da99 (plain)
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
#!/usr/local/bin/perl -w

use strict ;

use File::Slurp ;
use Carp ;
use Test::More ;

plan( tests => 1 ) ;

my $proc_file = "/proc/$$/auxv" ;

SKIP: {

	unless ( -r $proc_file ) {

		skip "can't find pseudo file $proc_file", 1 ;
	}

	test_pseudo_file() ;
}

sub test_pseudo_file {

	my $data_do = do{ local( @ARGV, $/ ) = $proc_file; <> } ;

#print "LEN: ", length $data_do, "\n" ;

	my $data_slurp = read_file( $proc_file ) ;
#print "LEN2: ", length $data_slurp, "\n" ;
#print "LEN3: ", -s $proc_file, "\n" ;

	is( $data_do, $data_slurp, 'pseudo' ) ;
}