{
my $result;
if ($type eq 'is') {
$result = $got eq $expected;
} elsif ($type eq 'isnt') {
$result = $got ne $expected;
} elsif ($type eq 'like') {
$result = $got =~ $expected;
t'\n";
if ($type eq 'is') {
print $^STDOUT, "# Expected '$expected'\n";
} elsif ($type eq 'isnt') {
print $^STDOUT, "# Expected not '$expected'\n";
} elsif ($type eq 'like') {
print
$result;
}
sub like {
_ok ('like', < @_);
}
sub is {
_ok ('is', < @_);
}
sub isnt {
_ok ('isnt', < @_);
}
eval "use 5.000"; # implicit semicolon
like ($^EVAL_ERROR->message, qr/use V
can_ok( 'main', "m" );
SILENCE_WARNING: do { # Complains because $_ is undef
no warnings;
isnt( m('unqualified'), "m-unqualified", "m('unqualified') is oper" );
};
is( main::m('main'), "m-main
() is func" );
is( &m('amper'), "m-amper", "&m() is func" );
# q operator
can_ok( 'main', "q" );
isnt( q('unqualified'), "q-unqualified", "q('unqualified') is oper" );
is( main::q('main'), "q-main",
is func" );
is( &q('amper'), "q-amper", "&q() is func" );
# qq operator
can_ok( 'main', "qq" );
isnt( qq('unqualified'), "qq-unqualified", "qq('unqualified') is oper" );
is( main::qq('main'), "qq-ma
($Is_Darwin && $Is_UFS);
if( !ok($mtime, 'hard link mtime') ||
!isnt($mtime, $ctime, 'hard link ctime != mtime') ) {
print $^STDERR, <<DIAG;
# Check if yo
losedir $bin_dh;
}
skip "No setuid programs", 3 if $uid == 0;
isnt($cnt, 0, 'found some programs');
isnt($uid, 0, ' found some setuid programs');
ok($uid +< $cnt, " th
- 2;
if (^~^0 - 1 == (^~^0) - 2) {
is($x, $y, "NV arithmetic");
} else {
isnt($x, $y, "IV/NV arithmetic");
}
cmp_ok(unpack ('w',$x), '==', ^~^0 - 1);
cmp_ok(unpack
= pack 'w', $y0;
if ($x0 == $y0) {
is($x, $y, "NV arithmetic");
} else {
isnt($x, $y, "IV/NV arithmetic");
}
cmp_ok(unpack ('w',$x), '==', $x0);
cmp_ok(unpack ('w'
,4000));
is("1.20.300.4000", sprintf "\%vd", pack(" U*",1,20,300,4000));
};
do {
use utf8;
isnt("\x{1}\x{14}\x{12c}\x{fa0}", sprintf "\%vd", pack("C0U*",1,20,300,4000));
my $rslt = "199 162";
(stat 'b')[[8..9]];
print $^STDOUT, "# utime undef, undef --> $atime, $mtime\n";
isnt($atime, 500000000, 'atime');
isnt($mtime, 500000000 + $delta, 'mtime');
SKIP: do {
skip "no futimes", 4 unles
main::is ($string, 'good');
# Test that the object has not already been "cursed".
main::isnt (ref shift, 'HASH');
}
# Now test inheritance of methods.
package OBJ;
our @ISA = @('BASEOBJ')
f-referential typeglob');
TODO: do {
my $name1 = "\0Chalk";
my $name2 = "\0Cheese";
isnt ($name1, $name2, "They differ");
is (${*{Symbol::fetch_glob($name1)}}, undef, 'Nothing befor
'Non-zero exit' );
is( $exit, $^CHILD_ERROR, 'Non-zero exit $?' );
isnt( !$^CHILD_ERROR_NATIVE, 0, 'Non-zero exit $^CHILD_ERROR_NATIVE' );
SKIP: do {
skip("No POSI
'No core dump' );
is( $^CHILD_ERROR ^&^ 127, 15, 'Term by signal $?' );
isnt( $^CHILD_ERROR_NATIVE, 0, 'Term by signal $^CHILD_ERROR_NATIVE' );
SKIP: do {
skip("No
IP: do {
skip("Orphan processes are not reparented on QNX", 1)
if $^OS_NAME eq 'nto';
isnt($first, $second,
"Orphaned $which grandchild got a new parent");
};
return $se
e not reparented on QNX", 1) if $^OS_NAME eq 'nto';
is ($first, $second, "Both orphaned grandchildren get the same new parent");
};
isnt ($first, $^PID, "And that new parent isn't this process");
re "./test.pl" }
plan tests => 4;
my ($foo, $bar);
is ref::address('foo'), undef;
ok ref::address(\$foo);
is ref::address(\$foo), ref::address(\$foo);
isnt ref::address(\$foo), ref::address(\$bar);
dynascope scope
my $mainscope = dynascope;
is( $mainscope, dynascope );
do {
isnt( $mainscope, dynascope );
is( $mainscope, dynascope->{parent} );
};
is( $mainscop
tor");
for (1..3) { @foo = @( each %hash ) }
$total = 0;
$total += $key while $key = each %hash;
isnt ($total, 100, "test iterator of each is being maintained");
for (1..3) { @foo = @( each %hash )
p("need perlio", 14) unless config_value("useperlio");
ok(open($f, ">&", $^STDOUT));
isnt(fileno($f), fileno($^STDOUT));
close $f;
ok(open($f, "<&=", $^STDIN)) or _diag $^OS_ERRO
'close failure on non-zero piped exit');
is($^OS_ERROR, '', ' errno');
isnt($^CHILD_ERROR, 0, ' status');
SKIP: do {
skip "Don't work yet", 6
@();
is( $x, undef );
};
do {
# check initialization to new value
my @refs;
for (1..2) {
my @($x) = qw|aap|;
push @refs, \$x;
}
isnt( @refs[0], @refs[1] );
};