First buckit of FAIL
Marcus Ramberg [Fri, 2 Jan 2009 21:11:01 +0000 (21:11 +0000)]
t/fail.t [new file with mode: 0644]

diff --git a/t/fail.t b/t/fail.t
new file mode 100644 (file)
index 0000000..11b5830
--- /dev/null
+++ b/t/fail.t
@@ -0,0 +1,15 @@
+use Devel::Declare;
+
+use Devel::Declare::MethodInstaller::Simple;
+BEGIN { Devel::Declare::MethodInstaller::Simple->install_methodhandler(name => 'method', into => 'main') };
+
+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/); 
+
+    eval 'method main ) { return "foo" }';
+    like($@,qr/Illegal\sdeclaration\sof\ssubroutine/); 
+};
\ No newline at end of file