From: Marcus Ramberg Date: Fri, 2 Jan 2009 21:21:54 +0000 (+0000) Subject: Check failure for subs starting with numbers X-Git-Tag: 0.005000~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=390ce4e811404cc9a8ec4dc55e62eff960350ce7;hp=70570efc3ad6f51bbdbd175a1a14fc6514a33997;p=p5sagit%2FDevel-Declare.git Check failure for subs starting with numbers --- diff --git a/t/fail.t b/t/fail.t index 11b5830..3e8cc4a 100644 --- a/t/fail.t +++ b/t/fail.t @@ -8,8 +8,15 @@ use Test::More 'no_plan'; TODO: { local $TODO='Method does not throw proper errors for bad parens yet'; eval 'method main ( { return "foo" }'; - like($@,qr/Prototype\snot\sterminated/); + like($@,qr/Prototype\snot\sterminated/,'Missing end parens'); eval 'method main ) { return "foo" }'; - like($@,qr/Illegal\sdeclaration\sof\ssubroutine/); + like($@,qr/Illegal\sdeclaration\sof\ssubroutine/,'Missing start parens'); +}; + +TODO: { + local $TODO='method does not throw proper errors for bad parens yet'; + eval 'method 1main() { return "foo" }','Sub starting with a number'; + like($@,qr/Illegal\sdeclaration\sof\sanonymous\ssubroutine/); + }; \ No newline at end of file