Skip to content

Commit

Permalink
improve test for not importing not exported operators.
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Mar 15, 2013
1 parent e143018 commit 5a95f71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S06-operator-overloading/imported-subs.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 17;
plan 19;

BEGIN { @*INC.push: 't/spec/packages' };

Expand Down Expand Up @@ -39,6 +39,12 @@ BEGIN { @*INC.push: 't/spec/packages' };

#?pugs todo
dies_ok { eval('3 notthere 4') }, 'not-exported operator was not imported';

{
my $fail = try eval q{3 notthere 4};
ok $! ~~ X::Syntax::Confused, 'not imported operator fails with X::Syntax::Confused.';
is $!.reason, "Two terms in a row", 'the reason is "Two terms in a row"';
}
}

eval_dies_ok '5!', 'import of operators is lexical';
Expand Down

0 comments on commit 5a95f71

Please sign in to comment.