Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve test for not importing not exported operators.

  • Loading branch information...
commit 5a95f71d145e362e9f703f923547e173eacc7ba6 1 parent e143018
@timo timo authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 S06-operator-overloading/imported-subs.t
View
8 S06-operator-overloading/imported-subs.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 17;
+plan 19;
BEGIN { @*INC.push: 't/spec/packages' };
@@ -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';
Please sign in to comment.
Something went wrong with that request. Please try again.