Author: fperrad
Date: Fri Jun  8 00:17:26 2007
New Revision: 18869

Modified:
   trunk/languages/lua/t/function.t

Log:
(Lua]
- add a test

Modified: trunk/languages/lua/t/function.t
==============================================================================
--- trunk/languages/lua/t/function.t    (original)
+++ trunk/languages/lua/t/function.t    Fri Jun  8 00:17:26 2007
@@ -24,7 +24,7 @@
 use FindBin;
 use lib "$FindBin::Bin";
 
-use Parrot::Test tests => 14;
+use Parrot::Test tests => 15;
 use Test::More;
 
 language_output_is( 'lua', <<'CODE', <<'OUT', 'add' );
@@ -190,6 +190,19 @@
 c      1
 OUT
 
+TODO: {
+    local $TODO = "cannot use '...' outside a vararg function";
+
+language_output_like( 'lua', <<'CODE', <<'OUT', 'invalid var args' );
+function f ()
+    print(...)
+end
+f()
+CODE
+/^[^:]+: [^:]+:\d+: cannot use '...' outside a vararg function/
+OUT
+}
+
 language_output_like( 'lua', <<'CODE', <<'OUT', 'orphan break' );
 function f()
     print "before"

Reply via email to