From fbaeec9fe7e9dffe42701aa9831aed0b4fb9a74e Mon Sep 17 00:00:00 2001 From: Ian Farmer Date: Mon, 27 Apr 2009 20:16:06 +0000 Subject: [PATCH] Add 2 new test cases. --- src/test/java/org/luaj/vm/CompatibiltyTest.java | 4 ++++ src/test/res/strlib.lua | 1 + src/test/res/test9.lua | 15 +++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 src/test/res/test9.lua diff --git a/src/test/java/org/luaj/vm/CompatibiltyTest.java b/src/test/java/org/luaj/vm/CompatibiltyTest.java index 0755699e..59b68aa9 100644 --- a/src/test/java/org/luaj/vm/CompatibiltyTest.java +++ b/src/test/java/org/luaj/vm/CompatibiltyTest.java @@ -48,6 +48,10 @@ public class CompatibiltyTest extends ScriptDrivenTest { runTest("test8"); } + public void testTest9() throws IOException, InterruptedException { + runTest("test9"); + } + public void testAutoload() throws IOException, InterruptedException { runTest("autoload"); } diff --git a/src/test/res/strlib.lua b/src/test/res/strlib.lua index 4025ffad..2d558800 100644 --- a/src/test/res/strlib.lua +++ b/src/test/res/strlib.lua @@ -1,3 +1,4 @@ +print( string.find("1234567890", ".", 0, true) ) print( string.find( 'alo alx 123 b\0o b\0o', '(..*) %1' ) ) print( string.find( 'aloALO', '%l*' ) ) print( string.find( ' \n isto � assim', '%S%S*' ) ) diff --git a/src/test/res/test9.lua b/src/test/res/test9.lua new file mode 100644 index 00000000..effd1c77 --- /dev/null +++ b/src/test/res/test9.lua @@ -0,0 +1,15 @@ +local x + +local function g() + local a, b, c + return a, b, c +end + +local function f() + print("hello") +end + +g() +x = ... + +f()