}
use warnings;
+use Config;
my $test = 1;
sub ok {
return 1;
}
-print "1..43\n";
+print "1..44\n";
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
else {
# the next tests are done in a subprocess because sh spits out a
# newline onto stderr when a child process kills itself with SIGINT.
- # We use a pipe rather than system() because the VMS command buffer
+ # We use a pipe rather than system() because the VMS command buffer
# would overflow with a command that long.
open( CMDPIPE, "| $PERL");
}
# $?, $@, $$
-system qq[$PERL -e "exit(0)"];
+system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(0)"];
ok $? == 0, $?;
-system qq[$PERL -e "exit(1)"];
+system qq[$PERL "-I../lib" -e "use vmsish qw(hushed); exit(1)"];
ok $? != 0, $?;
eval { die "foo\n" };
ok $@ eq "foo\n", $@;
ok $$ > 0, $$;
+eval { $$++ };
+ok $@ =~ /^Modification of a read-only value attempted/;
# $^X and $0
{
if ($^O eq 'qnx') {
chomp($wd = `/usr/bin/fullpath -t`);
}
- elsif($Is_Cygwin) {
+ elsif($Is_Cygwin || $Config{'d_procselfexe'}) {
# Cygwin turns the symlink into the real file
chomp($wd = `pwd`);
$wd =~ s#/t$##;
: (`echo \$__NoNeSuCh` eq "foo\n") );
}
-if ($Is_VMS) {
- ok(1,0,"'\$!=undef' does throw a warning");
-}
-else {
- local $SIG{'__WARN__'} = sub { print "# @_\nnot " };
+{
+ my $ok = 1;
+ my $warn = '';
+ local $SIG{'__WARN__'} = sub { $ok = 0; $warn = join '', @_; };
$! = undef;
- ok 1;
+ ok($ok, $warn, $Is_VMS ? "'\$!=undef' does throw a warning" : '');
}
# test case-insignificance of %ENV (these tests must be enabled only