New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rakudo is numificationally inconsistent between Str and Match (and the spec is out-of-date) #1796
Comments
From @masak<moritz_> rakudo: '1 ' ~~ /.*/; say +$/ |
@moritz - Status changed from 'new' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/integration/real-strings.t commit 9552cd839eafc433607391f7c53dd9a3939b2f51 [t/spec] refudged real-strings.t for rakudo, and add test for RT #75456 (numification of match objects with trailing space) Inline Patchdiff --git a/t/spec/integration/real-strings.t b/t/spec/integration/real-strings.t
index 6a01298..a909cad 100644
--- a/t/spec/integration/real-strings.t
+++ b/t/spec/integration/real-strings.t
@@ -14,8 +14,9 @@ plan *;
'basic sanity: .trans works with native Perl 6 strings';
}
+#?rakudo skip 'borked'
{
- my $x = 'abc'.split(m/b/).[0];
+ my $x = 'abc'.split(/b/).[0];
lives_ok {$x.trans(['a'] => ['b']) },
'Still works with strings returned from split() (lives)';
is $x.trans(['a'] => ['b']), 'b',
@@ -36,6 +37,7 @@ dies_ok { for "a b c".split(/\s/) -> $foo { $foo = $foo; } }, 'variables returne
ok 1.Str ~~ / ^ 1 $ /, 'RT 66366; 1.Str is a "good" Str';
+#?rakudo 3 skip 'borked'
is "helo".flip().trans("aeiou" => "AEIOU"), 'OlEh', '.flip.trans (RT 66300)';
is "helo".flip.trans(("aeiou" => "AEIOU")), 'OlEh', '.flip.trans (RT 66300)';
is "helo".lc.trans(("aeiou" => "AEIOU")), 'hElO', '.flip.trans (RT 66300)';
@@ -52,6 +54,7 @@ is "helo".lc.trans(("aeiou" => "AEIOU")), 'hElO', '.flip.trans (RT 66300)';
# not a "real string', but a "real hash" bug found in Rakudo:
+#?rakudo skip 'borked'
{
my $x = 0;
for %*VM.kv -> $k, $v { $x++};
@@ -64,6 +67,13 @@ is "helo".lc.trans(("aeiou" => "AEIOU")), 'hElO', '.flip.trans (RT 66300)';
#?rakudo todo 'RT 67852'
lives_ok { ('bit' ~& 'wise').trans() }, 'can .trans() on bitwise result';
}
+
+# RT #75456 hilarity
+{
+ ok ('1 ' ~~ /.+/) && $/ eq '1 ', 'matching sanity';
+ ok +$/ == 1, 'numification of match objects with trailing whitespaces';
+
+}
done_testing;
# vim: ft=perl6 |
Migrated from rt.perl.org#75456 (status was 'resolved')
Searchable as RT75456$
The text was updated successfully, but these errors were encountered: