diff options
author | David Walter Seikel | 2014-04-21 20:59:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-21 20:59:39 +1000 |
commit | 9621add2918cc4943e6693b74ae85d51dd264fcf (patch) | |
tree | fff1edf2c69d7a08a0e12885eecc9b96ed847a6a /LuaSL/testLua/yueliang-0.4.1/orig-5.0.3/test/test_lparser.lua | |
parent | LuaSL_test's window doesn't need to be so huge. (diff) | |
download | SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.zip SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.gz SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.bz2 SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.xz |
We don't need the testlua directory any more.
Diffstat (limited to '')
-rw-r--r-- | LuaSL/testLua/yueliang-0.4.1/orig-5.0.3/test/test_lparser.lua | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/LuaSL/testLua/yueliang-0.4.1/orig-5.0.3/test/test_lparser.lua b/LuaSL/testLua/yueliang-0.4.1/orig-5.0.3/test/test_lparser.lua deleted file mode 100644 index b9400cc..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/orig-5.0.3/test/test_lparser.lua +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | --[[-------------------------------------------------------------------- | ||
2 | |||
3 | test_lparser.lua | ||
4 | Test for lparser.lua | ||
5 | This file is part of Yueliang. | ||
6 | |||
7 | Copyright (c) 2005 Kein-Hong Man <khman@users.sf.net> | ||
8 | The COPYRIGHT file describes the conditions | ||
9 | under which this software may be distributed. | ||
10 | |||
11 | See the ChangeLog for more information. | ||
12 | |||
13 | ----------------------------------------------------------------------]] | ||
14 | |||
15 | ------------------------------------------------------------------------ | ||
16 | -- test the whole kaboodle | ||
17 | ------------------------------------------------------------------------ | ||
18 | |||
19 | require("../lzio") | ||
20 | require("../llex") | ||
21 | require("../lopcodes") | ||
22 | require("../ldump") | ||
23 | require("../lcode") | ||
24 | require("../lparser") | ||
25 | |||
26 | function lua_assert(test) | ||
27 | if not test then error("assertion failed!") end | ||
28 | end | ||
29 | |||
30 | luaX:init() | ||
31 | |||
32 | ------------------------------------------------------------------------ | ||
33 | -- try 1 | ||
34 | ------------------------------------------------------------------------ | ||
35 | |||
36 | local zio = luaZ:init(luaZ:make_getS("local a = 1"), nil, "=string") | ||
37 | local LuaState = {} | ||
38 | local Func = luaY:parser(LuaState, zio, nil) | ||
39 | |||
40 | --[[ | ||
41 | for i, v in Func do | ||
42 | if type(v) == "string" or type(v) == "number" then | ||
43 | print(i, v) | ||
44 | elseif type(v) == "table" then | ||
45 | print(i, "TABLE") | ||
46 | end | ||
47 | end | ||
48 | --]] | ||
49 | |||
50 | local Writer, Buff = luaU:make_setF("parse1.out") | ||
51 | luaU:dump(LuaState, Func, Writer, Buff) | ||
52 | |||
53 | ------------------------------------------------------------------------ | ||
54 | -- try 2 | ||
55 | ------------------------------------------------------------------------ | ||
56 | |||
57 | zio = luaZ:init(luaZ:make_getF("sample.lua"), nil, "@sample.lua") | ||
58 | Func = luaY:parser(LuaState, zio, nil) | ||
59 | Writer, Buff = luaU:make_setF("parse2.out") | ||
60 | luaU:dump(LuaState, Func, Writer, Buff) | ||