diff options
Diffstat (limited to 'Examples/test-suite/lua/multi_import_runme.lua')
| -rw-r--r-- | Examples/test-suite/lua/multi_import_runme.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Examples/test-suite/lua/multi_import_runme.lua b/Examples/test-suite/lua/multi_import_runme.lua new file mode 100644 index 0000000..5d4c136 --- /dev/null +++ b/Examples/test-suite/lua/multi_import_runme.lua @@ -0,0 +1,16 @@ +require("import") -- the import fn +-- note: need to import the base class module before the derived class +-- this is because if the derived class is imported first it doesn't get the base class methods +import("multi_import_b") -- import code +import("multi_import_a") -- import code + +x = multi_import_b.XXX() +assert(x:testx() == 0) + +y = multi_import_b.YYY() +assert(y:testx() == 0) +assert(y:testy() == 1) + +z = multi_import_a.ZZZ() +assert(z:testx() == 0) +assert(z:testz() == 2) |
