Permalink
Browse files

test for RT #72872, Mu eqv Mu

git-svn-id: http://svn.pugscode.org/pugs@29890 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
moritz
moritz committed Feb 28, 2010
1 parent 06301b2 commit 1571369844c844bb991cd66319d0bd368f181e4a
Showing with 19 additions and 6 deletions.
  1. +4 −0 S02-literals/listquote-whitespace.t
  2. +5 −0 S03-operators/arith.t
  3. +8 −4 S03-operators/eqv.t
  4. +2 −1 S05-metasyntax/repeat.t
  5. +0 −1 S06-multi/type-based.t
@@ -53,10 +53,14 @@ for @separators -> $sep {
for @nonseparators -> $sep {
my $ex = @list.join($sep);
+ say "Seperator: '$sep'";
my $str = "<" ~$ex~ ">";
my @res = eval $str;
+ say @res.perl;
+ say $sep.PARROT;
my $vis = sprintf "%02x", ord $sep;
+ say "alive";
#?rakudo emit if $sep eq "\xa0" {
#?rakudo emit todo('\xa0 should not be a separator for list quotes');
#?rakudo emit };
View
@@ -427,6 +427,11 @@ dies_ok( { $x := 0; say 3 div $x; }, 'Division by zero dies and is catchable wit
is (1..10).grep( * !% 3 ), <3 6 9>, '!% works with whatever *'
}
+{
+ is &infix:<+>(3, 6), 9, 'Can access &infix:<+>';
+
+}
+
done_testing;
# vim: ft=perl6
View
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 45;
+plan 48;
# L<S03/Comparison semantics/Binary eqv tests equality much like === does>
# L<S32::Basics/Any/"=item eqv">
@@ -33,7 +33,6 @@ plan 45;
ok !($a eqv $b), "eqv on value types (2-3)";
}
-# Reference types
#?rakudo skip 'binding NYI'
{
my @a = (1,2,3);
@@ -76,8 +75,7 @@ plan 45;
}
{
- my $num = 3;
- my $a = \$num;
+ my $num = 3; my $a = \$num;
my $b = \$num;
ok ($a eqv $a), "eqv on scalar references (2-1)";
@@ -132,4 +130,10 @@ plan 45;
is(0 eqv 1, Bool::False, 'eqv returns Bool::False when false');
}
+{
+ is Mu eqv Mu, Bool::True, 'Mu eqv Mu';
+ is Any eqv Any, Bool::True, 'Any eqv Any';
+ is Any eqv Mu, Bool::False, 'Any !eqv Mu';
+}
+
# vim: ft=perl6
View
@@ -14,12 +14,13 @@ be valid perl6.
# Note: single-quotes.t tests repetition on single quoted items in regexes.
-plan 17;
+plan 18;
# L<S05/Bracket rationalization/The general repetition specifier is now>
# Exact repetition
ok("abcabcabcabcd" ~~ m/[abc]**4/, 'Fixed exact repetition');
+is $/, 'abc' x 4, '...with the correct capture';
ok(!("abcabcabcabcd" ~~ m/[abc]**5/), 'Fail fixed exact repetition');
#?pugs todo force_todo
ok("abcabcabcabcd" ~~ m/[abc]**{4}/, 'Fixed exact repetition using closure');
View
@@ -60,7 +60,6 @@ is(mmd(1..3), 2, 'Slurpy MMD to listop via list');
multi sub sigil-t (%h) { 'Associative' }
is sigil-t(1), 'Any', 'Sigil-based dispatch (Any)';
is sigil-t({ $_ }), 'Callable', 'Sigil-based dispatch (Callable)';
- #?rakudo skip '<a b c> in parameter list flattens :-('
is sigil-t(<a b c>), 'Positional','Sigil-based dispatch (Arrays)';
is sigil-t(%h), 'Associative','Sigil-based dispatch (Associative)';

0 comments on commit 1571369

Please sign in to comment.