This is an automatically generated mail to inform you that tests are now
available in t/spec/S02-names/identifier.t
commit e4bce85a069b2b0af6fb9b71d719ebaf9f296b36
Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Tue Aug 24 08:47:16 2010 +0000
[t/spec] tests for RT #77218, identifiers that start with an operator name
git-svn-id: http://svn.pugscode.org/p...@32095
c213334d-75ef-0310-aa23-eaa082d1ae64
diff --git a/t/spec/S02-names/identifier.t b/t/spec/S02-names/identifier.t
index 8bc9b52..60515e3 100644
--- a/t/spec/S02-names/identifier.t
+++ b/t/spec/S02-names/identifier.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 18;
+plan 20;
# L<S02/Names/An identifier is composed of an alphabetic character>
@@ -84,6 +84,25 @@ plan 18;
is my($x), 23, 'call to sub named "my" works';
}
+# RT #77218
+# Rakudo had troubles with identifiers whos prefix is an alphanumeric infix
+# operator; for example 'sub order' would fail because 'order' begins with
+# 'or'
+{
+ my $res;
+ sub order-beer($what) { $res = "a $what please!" };
+ order-beer('Pils');
+ is $res, 'a Pils please!',
+ 'can call subroutines whos name begin with an alphabetic infix (or)';
+
+ my $tempo;
+ sub andante() { $tempo = 'walking pace' }
+ andante;
+
+ is $tempo, 'walking pace',
+ 'can call subroutines whos name begin with an alphabetic infix (and)';
+}
+
done_testing;
# vim: ft=perl6