From b0e30be7efe4590db98df8751929473976ff9856 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 22 Dec 2024 23:11:25 +0800 Subject: [PATCH] add test.lua --- tests/apis/namespace/basic/test.lua | 3 +++ tests/apis/namespace/nested/test.lua | 3 +++ xmake/core/base/interpreter.lua | 1 + 3 files changed, 7 insertions(+) create mode 100644 tests/apis/namespace/basic/test.lua create mode 100644 tests/apis/namespace/nested/test.lua diff --git a/tests/apis/namespace/basic/test.lua b/tests/apis/namespace/basic/test.lua new file mode 100644 index 00000000000..83c0a954648 --- /dev/null +++ b/tests/apis/namespace/basic/test.lua @@ -0,0 +1,3 @@ +function main() + os.exec("xmake -vD") +end diff --git a/tests/apis/namespace/nested/test.lua b/tests/apis/namespace/nested/test.lua new file mode 100644 index 00000000000..83c0a954648 --- /dev/null +++ b/tests/apis/namespace/nested/test.lua @@ -0,0 +1,3 @@ +function main() + os.exec("xmake -vD") +end diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index 6445f9ad58f..f6f94904798 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -954,6 +954,7 @@ function interpreter:api_register_scope(...) local scope_args = table.pack(...) local scope_name = scope_args[1] local scope_info = scope_args[2] + local namespace = self._NAMESPACE_STR -- check invalid scope name, @see https://github.com/xmake-io/xmake/issues/4547 if scope_args.n > 0 and type(scope_name) ~= "string" then