summaryrefslogtreecommitdiff
path: root/t/pseudo.t
diff options
context:
space:
mode:
Diffstat (limited to 't/pseudo.t')
-rw-r--r--t/pseudo.t34
1 files changed, 34 insertions, 0 deletions
diff --git a/t/pseudo.t b/t/pseudo.t
new file mode 100644
index 0000000..5deda84
--- /dev/null
+++ b/t/pseudo.t
@@ -0,0 +1,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' ) ;
+}