Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] Test for RT #62836

git-svn-id: http://svn.pugscode.org/pugs@27381 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit d970028c55eb7b6dd018ebd9fa6e3384c7fb35a7 1 parent 97d1e85
kyle authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 S02-builtin_data_types/lists.t
View
16 S02-builtin_data_types/lists.t
@@ -7,7 +7,7 @@ use Test;
# for this test. See
# L<"http://www.nntp.perl.org/group/perl.perl6.language/22924">
-plan 16;
+plan 18;
# Indexing lists
{
@@ -127,3 +127,17 @@ plan 16;
is +$arrayref, 3, '\@array creates an arrayref (1)';
is +$arrayref[1], 2, '\@array creates an arrayref (2)';
}
+
+{
+ sub List::rt62836 { 62836 }
+
+ dies_ok { <1 2 3>.rt62836 },
+ 'call to user-declared sub in List:: class dies';
+ eval '<1 2 3>.rt62836';
+ ok "$!" ~~ /rt62836/, 'error message contains name of sub';
+ ok "$!" ~~ /not \s+ found/, 'error message says "not found"';
+ ok "$!" ~~ /List/, 'error message contains name of class';
+
+ class List is also { method rt62836_x { 62836 } };
+ is <1 2 3>.rt62836_x, 62836, 'call user-declared method in List:: class';
+}
Please sign in to comment.
Something went wrong with that request. Please try again.