Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a couple of tests for RT #76096
  • Loading branch information
perlpilot committed Jul 30, 2014
1 parent f0033ca commit b25116e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion S06-other/misc.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 3;
plan 5;

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

Expand All @@ -11,3 +11,7 @@ sub a () { my $a=4; }; #zero-arg sub to test the underlying problem #OK not us
eval_dies_ok 'e("wtz")', "e should not be defined to accept arguments";
eval_dies_ok 'pi("wtz")',"pi should not be defined to accept arguments either :) ";
dies_ok { EVAL('a(3)') }, "this should die, no arguments defined";

# RT #76096
lives_ok { sub foo($ where 1 --> Int) { return 42 } }, "where clause combined with --> works";
lives_ok { sub foo($ where 1, $y --> Int) { return 42 } }, "where clause combined with --> works";

0 comments on commit b25116e

Please sign in to comment.