From: Marcus Ramberg Date: Fri, 2 Jan 2009 21:11:01 +0000 (+0000) Subject: First buckit of FAIL X-Git-Tag: 0.005000~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-Declare.git;a=commitdiff_plain;h=70570efc3ad6f51bbdbd175a1a14fc6514a33997 First buckit of FAIL --- diff --git a/t/fail.t b/t/fail.t new file mode 100644 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