Skip to content
Browse files

nom fudging

  • Loading branch information...
1 parent bcd4217 commit 878f33bcc63dcfa581705095562e7053054f3c01 @coke coke committed Jul 30, 2011
View
4 S05-match/arrayhash.t
@@ -12,15 +12,19 @@ plan 8;
# Matching against an array should be true if any of the values match.
my @a = ('a', 'b' );
ok(@a ~~ / 'b' /);
+#?rakudo todo 'nom regression'
ok(@a ~~ / ^ 'b' /);
ok(@a ~~ / ^ 'a' /);
+#?rakudo todo 'nom regression'
ok(@a ~~ / ^ 'a' $ /);
# Matching against a hash should be true if any of the keys match.
my %a = ('a' => 1, 'b' => 2);
ok(%a ~~ / 'b' /);
+#?rakudo todo 'nom regression'
ok(%a ~~ / ^ 'b' /);
ok(%a ~~ / ^ 'a' /);
+#?rakudo todo 'nom regression'
ok(%a ~~ / ^ 'a' $ /);
# vim: ft=perl6
View
8 S05-match/blocks.t
@@ -19,6 +19,7 @@ if 1 {
is ~$/, 'a', '... and can use the match var';
}
+#?rakudo todo 'nom regression'
ok !defined($/), '$/ still undefined in the outer block';
my $loop = 1;
@@ -28,19 +29,22 @@ while $loop {
is ~$/, 'b', '... and can use the match var';
$loop = 0;
}
+#?rakudo todo 'nom regression'
ok !defined($/), '$/ still undefined in the outer block';
{
ok 'c' ~~ /./, 'Can match in a bare block';
is ~$/, 'c', '... and can use the match var';
}
+#?rakudo todo 'nom regression'
ok !defined($/), '$/ still undefined in the outer block';
my $discarded = do {
ok 'd' ~~ /./, 'Can match in a do block';
is ~$/, 'd', '... and can use the match var';
}
+#?rakudo todo 'nom regression'
ok !defined($/), '$/ still undefined in the outer block';
{
@@ -76,6 +80,7 @@ ok !defined($/), '$/ still undefined in the outer block';
flunk 'regex did not match - $/ is properly set with explicit $_ in a given { } block';
}
if /\w+/ {
+ #?rakudo todo 'skip'
ok $/ eq 'Wall', '$/ is properly set in a given { } block';
} else {
flunk 'regex did not match - $/ is properly set in a given { } block';
@@ -96,12 +101,15 @@ ok !defined($/), '$/ still undefined in the outer block';
if /not/ { $s2 = 0 }
}
is $s1, 1, '/foo/ matched against $_ (successfully)';
+ #?rakudo todo 'nom regression'
is $s2, 1, '/not/ matched against $_ (no match)';
given 'foo' {
if /bar/ {
+ #?rakudo todo 'nom regression'
ok 0, 'match in /if/;'
} else {
+ #?rakudo todo 'nom regression'
ok 1, 'match in /if/;'
}
}
View
9 S05-modifier/counted-match.t
@@ -15,6 +15,7 @@ my $data = "f fo foo fooo foooo fooooo foooooo";
# :nth(N)...
{
+ #?rakudo todo 'nom regression'
nok $data.match(/fo+/, :nth(0)), 'No match nth(0)';
my $match = $data.match(/fo+/, :nth(1));
@@ -23,16 +24,20 @@ my $data = "f fo foo fooo foooo fooooo foooooo";
$match = $data.match(/fo+/, :nth(2));
ok $match, 'Match :nth(2)';
+ #?rakudo todo 'nom regression'
is ~$match, 'foo', 'Matched value for :nth(2)';
$match = $data.match(/fo+/, :nth(3));
ok $match, 'Match :nth(3)';
+ #?rakudo todo 'nom regression'
is ~$match, 'fooo', 'Matched value for :nth(3)';
$match = $data.match(/fo+/, :nth(6));
ok $match, 'Match :nth(6)';
+ #?rakudo todo 'nom regression'
is ~$match, 'foooooo', 'Matched value for :nth(6)';
+ #?rakudo todo 'nom regression'
nok $data.match(/fo+/, :nth(7)), 'No match nth(7)';
}
@@ -45,6 +50,7 @@ my $data = "f fo foo fooo foooo fooooo foooooo";
#
# more interesting variations of :nth(...)
+#?rakudo todo 'nom regression'
{
my @match = $data.match(/fo+/, :nth(2, 3)).list;
is +@match, 2, 'nth(list) is ok';
@@ -60,12 +66,14 @@ my $data = "f fo foo fooo foooo fooooo foooooo";
}
{
+ #?rakudo todo 'nom regression'
is 'abecidofug'.match(/<[aeiou]>./, :nth(1,3,5), :x(2)).join('|'),
'ab|id', ':x and :nth';
nok 'abecidofug'.match(/<[aeiou]>./, :nth(1,3,5,7,9), :x(6)).join('|'),
':x and :nth (not matching)';
+ #?rakudo todo 'nom regression'
is 'abcdefg'.match(/.*/, :nth(2,4,6,7), :x(2..3), :overlap).join('|'),
'bcdefg|defg|fg', ':x and :nth and :overlap';
@@ -74,6 +82,7 @@ my $data = "f fo foo fooo foooo fooooo foooooo";
}
# test that non-monotonic items in :nth lists are ignored
+#?rakudo todo 'nom regression'
{
is 'abacadaeaf'.match(/a./, :nth(2, 1, 4)).join(', '),
'ac, ae', 'non-monotonic items in :nth are ignored';
View
1 S11-modules/nested.t
@@ -9,6 +9,7 @@ plan 6;
BEGIN { @*INC.push('t/spec/packages/') };
+#?rakudo 5 todo 'nom regression'
eval_lives_ok 'use A::A', 'Can load classes from nested modules';
eval_lives_ok 'use A::A; A::B::D ~~ A::B::B or die()',
'... and the composition worked';
View
3 S14-roles/conflicts.t
@@ -32,12 +32,15 @@ my $a;
ok(($a = General.new()), "basic class instantiation works");
is $a.shake("sentry"), "A", "conflict resolution works (1-1)";
is $was_in_general_shake, 1, "conflict resolution works (1-2)";
+#?rakudo todo 'nom regression'
is $was_in_sentry_shake, 1, "conflict resolution works (1-3)";
# As usual, is instead of todo_is to avoid unexpected suceedings.
is $was_in_pet_shake, 0, "conflict resolution works (1-4)";
is $a.shake("pet"), "B", "conflict resolution works (2-1)";
is $was_in_general_shake, 2, "conflict resolution works (2-2)";
+#?rakudo todo 'nom regression'
is $was_in_sentry_shake, 1, "conflict resolution works (2-3)";
+#?rakudo todo 'nom regression'
is $was_in_pet_shake, 1, "conflict resolution works (2-4)";
# vim: ft=perl6
View
2 S32-hash/invert.t
@@ -8,13 +8,15 @@ plan 5;
{
my %h = a => 'b', c => 'd';
isa_ok %h.invert, List, 'Hash.invert returns a List';
+ #?rakudo todo 'nom regression'
is_deeply %h.invert.sort, (b => 'a', d => 'c'), 'simple Hash.invert works';
is_deeply %h, { a => 'b', c => 'd' }, 'original remains unchanged';
}
{
# with lists
my %h = a => <b c>, d => 'e';
+ #?rakudo todo 'nom regression'
is_deeply %h.invert.sort, (b => 'a', c => 'a', e => 'd'),
'Hash.invert flattens list values';
is_deeply %h, {a => <b c>, d => 'e'}, 'original remains unchanged';
View
6 S32-io/file-tests.t
@@ -45,18 +45,24 @@ isa_ok $non-existent-file.IO ~~ :!f, Bool, '~~ :!f returns Bool';
##is empty
nok $zero-length-file.IO.s, 'Is empty';
+#?rakudo todo 'nom regression'
isa_ok $zero-length-file.IO.s, Int, '.s returns Int';
ok $zero-length-file.IO ~~ :!s, 'Is empty';
isa_ok $zero-length-file.IO ~~ :!s, Bool, '~~ :!s returns Bool';
ok $existing-file.IO.s, 'Is not';
+#?rakudo todo 'nom regression'
isa_ok $existing-file.IO.s, Int, '.s returns Int';
ok $existing-file.IO ~~ :s, 'Is not';
isa_ok $existing-file.IO ~~ :s, Bool, '~~ :s returns Bool';
##file size
+#?rakudo todo 'nom regression'
is $zero-length-file.IO.s, 0, 'No size';
+#?rakudo todo 'nom regression'
isa_ok $zero-length-file.IO.s, Int, '.s returns Int';
+#?rakudo todo 'nom regression'
is $existing-file.IO.s, 11, 'size of file';
+#?rakudo todo 'nom regression'
isa_ok $existing-file.IO.s, Int, '.s returns Int';
# clean up
View
5 S32-str/index.t
@@ -35,11 +35,16 @@ is(index("Hello World", "Hello World"), 0, "Substr eq Str");
# Empty strings
+#?rakudo todo 'nom regression'
is(index("Hello World", ""), 0, "Substr is empty");
+#?rakudo todo 'nom regression'
is(index("", ""), 0, "Both strings are empty");
ok(!defined(index("", "Hello")), "Only main-string is empty");
+#?rakudo todo 'nom regression'
is(index("Hello", "", 3), 3, "Substr is empty, pos within str");
+#?rakudo todo 'nom regression'
is(index("Hello", "", 5), 5, "Substr is empty, pos at end of str");
+#?rakudo todo 'nom regression'
is(index("Hello", "", 999), 5, "Substr is empty, pos > length of str");
# More difficult strings
View
3 integration/advent2009-day14.t
@@ -23,8 +23,10 @@ is_approx $a, 3.3333333e-05;
is $a.perl, "1/30000";
$a = 1/60000 + 1/60001;
+#?rakudo todo 'nom regression'
is $a.WHAT.gist, "Num()";
is_approx $a, 3.333305e-05;
+#?rakudo todo 'nom regression'
ok $a.perl ~~ / '3.3333' /;
@@ -34,6 +36,7 @@ is_approx $a, 0.99999999;
is 3.14.Rat.perl, "157/50";
is pi.Rat.perl, "355/113";
+#?rakudo todo 'nom regression'
is pi.Rat(1e-10).perl, "312689/99532";
is 1.75.WHAT.gist, "Rat()";

0 comments on commit 878f33b

Please sign in to comment.
Something went wrong with that request. Please try again.