summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-12-22 23:11:25 +0800
committerruki <[email protected]>2025-01-06 18:12:52 +0800
commit4b35267f3de12f93234467e84b08f5c8b7aef281 (patch)
tree0e3cf99767930f0fa2b59fc9581572eb5f360161
parent3e07f684154dfd9e7d0c9b14c81320e6e4b203cd (diff)
add test.lua
-rw-r--r--tests/apis/namespace/basic/test.lua3
-rw-r--r--tests/apis/namespace/nested/test.lua3
-rw-r--r--xmake/core/base/interpreter.lua1
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/apis/namespace/basic/test.lua b/tests/apis/namespace/basic/test.lua
new file mode 100644
index 000000000..83c0a9546
--- /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 000000000..83c0a9546
--- /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 c8b087333..ccf49f1ec 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