From 0251db605ccd9b129290a08a85cf00a991faf1e1 Mon Sep 17 00:00:00 2001 From: Jonathan Worthington Date: Thu, 16 Apr 2015 11:30:06 +0200 Subject: [PATCH] Test 'use MONKEY-TYPING' acts lexically. --- S32-exceptions/misc.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/S32-exceptions/misc.t b/S32-exceptions/misc.t index adba17c745..42194da184 100644 --- a/S32-exceptions/misc.t +++ b/S32-exceptions/misc.t @@ -3,7 +3,7 @@ use Test; use lib "t/spec/packages"; use Test::Util; -plan 302; +plan 303; throws_like '42 +', X::AdHoc, "missing rhs of infix", message => rx/term/; @@ -124,6 +124,8 @@ throws_like '@a', X::Undeclared, symbol => '@a'; # RT #115396 throws_like '"@a[]"', X::Undeclared, symbol => '@a'; throws_like 'augment class Any { }', X::Syntax::Augment::WithoutMonkeyTyping; +throws_like '{ use MONKEY-TYPING; }; augment class Any { }', X::Syntax::Augment::WithoutMonkeyTyping, + 'MONKEY-TYPING applies lexically'; throws_like 'use MONKEY-TYPING; augment role Positional { }', X::Syntax::Augment::Illegal; throws_like 'use MONKEY-TYPING; enum Weekday ; augment class Weekday { }', X::Syntax::Augment::Illegal; throws_like 'sub postbla:sym() { }', X::Syntax::Extension::Category, category => 'postbla';