BEGIN {
chdir 't' if -d 't';
- @INC = '../lib' if -e '../lib';
+ unshift @INC, '../lib' if -e '../lib';
}
+
+if ($^O eq 'mpeix') {
+ print "1..0 # Skip: broken on MPE/iX\n";
+ exit 0;
+}
+
my $perl = -e '../perl' ? '../perl' : -e './perl' ? './perl' : 'perl';
use strict;
15 => [ 255, 1],
16 => [ 255, 256],
# see if implicit close preserves $?
- 17 => [ 42, 42, '{ local *F; open F, q[TEST]; close F } die;'],
+ 17 => [ 0, 512, '{ local *F; open F, q[TEST]; close F; $!=0 } die;'],
);
my $max = keys %tests;
? system qq($perl -e "\$! = $bang; \$? = $query; $code" 2> nul)
: system qq($perl -e '\$! = $bang; \$? = $query; $code' 2> /dev/null));
- printf "# 0x%04x 0x%04x 0x%04x\nnot ", $exit, $bang, $query
- unless $exit == (($bang || ($query >> 8) || 255) << 8);
+ printf "# 0x%04x 0x%04x 0x%04x\n", $exit, $bang, $query;
+ print "not " unless $exit == (($bang || ($query >> 8) || 255) << 8);
print "ok $test\n";
}