doesnt make 5'));
## isnt
isnt(2 + 2, 5, '2 and 2 does not make 5');
isnt(2 + 2, 5, desc => '2 and 2 does not make 5');
isnt(2 + 2, 5, :desc('2 and 2 does not make 5'));
isnt(2 + 2, 4, '2 and 2 do
es make 4', :todo(1));
isnt(2 + 2, 4, desc => '2 and 2 does make 4', todo => 1);
isnt(2 + 2, 4, :desc('2 and 2 does make 4'), todo => 1);
## is_deeply
is_deeply([ 1..4 ], [ 1..4 ],
"is_dee
is @array.min:{ $^a <=> $^b }, -9,
"method form of min with identity comparison block works";
isnt @array.min:{ $^a <=> $^b }, 7,
"bug -- method form of min with identity comparison block return
in({ $^a <=> $^b }, @array), -9,
"subroutine form of min with identity comparison block works";
isnt min({ $^a <=> $^b }, @array), 7,
"bug -- subroutine form of min with identity comparison block
;
is @array.max:{ $^a <=> $^b }, 7,
"method form of max with identity comparison block works";
isnt @array.max:{ $^a <=> $^b }, -9,
"bug -- method form of max with identity comparison block retur
ociative all()");
isnt('1 2 3', ~((1^2)^3).values, "Left-associative one, ^ operator");
isnt('1 2 3', ~(1^(2^3)).values, "Right-associative one, ^ operator");
isnt('1 2 3', ~one(one(1,2)
,3).values, "Left-associative one()");
isnt('1 2 3', ~one(1,one(2,3)).values, "Right-associative one()");
is('1 2 3', ~none(none(1,2),3).values, "Left-associative none()");
is('1 2 3', ~n
10, "Single embedded underscore works";
isnt eval('1__0'), 10, "Multiple embedded underscores fail";
isnt eval('10_'), 10, "Trailing underscore fails";
isnt eval('10_.0'), 10, "Underscore before .
that task
# is why the salt exists to begin with.
isnt $pw1, $pw3, 'different salts give different results';
my $pw4 = crypt '12345679', 'XX';
isnt $pw1, $pw4, 'different key give different results
t ~~ rx/$pattern/";
ok( !$! && $/, $description, :$todo );
$! and diag $!;
}
sub p6rule_isnt( $target, $pattern, $description?, :$todo ) {
eval "\$target ~~ rx/$pattern/";
ok( !$! &&
rule_is($target, $pattern, $description, :$todo);
}
elsif $result eq 'n' {
p6rule_isnt($target, $pattern, $description, :$todo);
}
else { die "bug\n$line" }
sleep 1 unless
$letter { is( $letter , 'a') }
# Do pointy subs send along an implicit param? No!
for @list -> { isnt($_, 'a') }
# Hm. PIL2JS currently dies here (&statement_control:<for> passes one argument
# to th
val) }, "parses correctly, second statement is true");
my %hash = ("foo", "bar");
ok(!(eval '%hash <foo>; 1'), '%hash \s+ <subscript> doesnt parse');
isnt($!,"",'... and it sets $!');
};
itto for anonymous subs');
is((sub { { { 3 } } }).(), 3, 'ditto, even if nested');
dies_ok({(sub { { $^x } }).()}, 'implicit params become errors');
isnt((sub { -> { 3 } }).(), 3, 'as are pointies');
close $out;
my$in = open "tmpfile";
my $s = =$in; close $in;
unlink "tmpfile";
isnt $s,"3", 'and global $_ should not be the default topic of "for"';
my @mutable_array = 1..3;
tions";
# -V:foo vs. -V foo
my $fullversion = run_pugs('-V unknown_option_that_does_not_exist');
isnt( index($fullversion, "This is Perl6 User's Golfing System"), -1, "-V foo vs. -V:foo")
or diag $
ot sure where this should go
{
is(
eval('if ( my $x = 2 ) == 2 { $x; }'),
2,
"'my' variable within 'if' conditional");
}
{
isnt(eval('if 1; 2'), 2, 'test "if 1"');
}