[Bast-commits] r5284 - Devel-Declare/1.000/trunk/t
marcus at dev.catalyst.perl.org
marcus at dev.catalyst.perl.org
Fri Jan 2 21:21:54 GMT 2009
Author: marcus
Date: 2009-01-02 21:21:54 +0000 (Fri, 02 Jan 2009)
New Revision: 5284
Modified:
Devel-Declare/1.000/trunk/t/fail.t
Log:
Check failure for subs starting with numbers
Modified: Devel-Declare/1.000/trunk/t/fail.t
===================================================================
--- Devel-Declare/1.000/trunk/t/fail.t 2009-01-02 21:11:01 UTC (rev 5283)
+++ Devel-Declare/1.000/trunk/t/fail.t 2009-01-02 21:21:54 UTC (rev 5284)
@@ -8,8 +8,15 @@
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
More information about the Bast-commits
mailing list