From efce5b6bd5c9d4f8214a71e0f7a7c35751710a4c Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 8 Nov 2021 01:17:11 +0800 Subject: + tolua + lpeg --- ThirdParty/toluapp/src/tests/tnamespace.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ThirdParty/toluapp/src/tests/tnamespace.lua (limited to 'ThirdParty/toluapp/src/tests/tnamespace.lua') diff --git a/ThirdParty/toluapp/src/tests/tnamespace.lua b/ThirdParty/toluapp/src/tests/tnamespace.lua new file mode 100644 index 0000000..3a51dfb --- /dev/null +++ b/ThirdParty/toluapp/src/tests/tnamespace.lua @@ -0,0 +1,14 @@ +-- test valid access +assert(A.a==1) +assert(A.B.b==2) +assert(A.B.C.c==3) + +-- test invalid access +assert(A.B.a==nil) -- no inheritance +assert(A.B.C.a==nil) + +assert(A.b==nil) -- no access the inner module +assert(A.c==nil) +assert(A.B.c==nil) + +print("Namespace test OK") -- cgit v1.1-26-g67d0