diff options
Diffstat (limited to 'test/basic')
-rw-r--r-- | test/basic/linker.lua | 16 | ||||
-rw-r--r-- | test/basic/linker.txt | 16 |
2 files changed, 27 insertions, 5 deletions
diff --git a/test/basic/linker.lua b/test/basic/linker.lua index bf4e50bb..0be93e8d 100644 --- a/test/basic/linker.lua +++ b/test/basic/linker.lua @@ -37,24 +37,28 @@ local function TEST(script) end CARE['id'] = true +CARE['loc'] = true TEST [[ local <?x?> ]] { - id = '9', + id = '9', + loc = true, } TEST [[ local x print(<?x?>) ]] { - id = '7', + id = '7', + loc = true, } TEST [[ local x <?x?> = 1 ]] { - id = '7', + id = '7', + loc = true, } CARE['global'] = true @@ -76,14 +80,16 @@ TEST [[ local x print(x.y.<?z?>) ]] { - id = '7|"y"|"z"', + id = '7|"y"|"z"', + loc = true, } TEST [[ local x function x:<?f?>() end ]] { - id = '7|"f"', + id = '7|"f"', + loc = true, } TEST [[ diff --git a/test/basic/linker.txt b/test/basic/linker.txt new file mode 100644 index 00000000..18176369 --- /dev/null +++ b/test/basic/linker.txt @@ -0,0 +1,16 @@ +ast -> linkers = { + globals = { + ['"X"|"Y"|"Z"'] = {src1, src2, src3}, + ['"X"|"Y"'] = {src4, src5, src6}, + ['"X"'] = {src7, src8, src9}, + }, + locals = { + ['7'] = {src10}, + ['7|"x"'] = {src11}, + }, + tfield = { + ['11|"k"'] = {src12}, + }, +} + + |