Skip to content

Commit

Permalink
Add tests for RT #117901
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Mar 2, 2015
1 parent 83da5c2 commit c3d0fa4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion S06-other/misc.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 6;
plan 9;

#not really much of a test (no links to the spec either). Please improve, I only wrote what was required! --lue

Expand All @@ -25,3 +25,17 @@ dies_ok { EVAL('a(3)') }, "this should die, no arguments defined";
lives_ok { sub ndr($r where ($r ||= 10) > 0 && 1) { } },
'where clause followed by (non-parenthesized) expression with "&&" in it does parse';
}

# RT #117901
{
my $rt117901;
sub not-foo { $rt117901 = 2 };
sub so-what { $rt117901 = "nyan" };
sub m-bar { $rt117901 = "string" };
not-foo();
is $rt117901, 2, "can name sub 'not-foo'";
so-what();
is $rt117901, "nyan", "can name sub 'so-what'";
m-bar();
is $rt117901, "string", "can name sub 'm-bar'";
}

0 comments on commit c3d0fa4

Please sign in to comment.