Add delgd validation test for py_func and lua_func
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,4 +41,12 @@ function module.get_context_value()
|
||||
return tm.gd("_lua_ctx_test_value")
|
||||
end
|
||||
|
||||
function module.test_delgd()
|
||||
tm.setgd("_lua_delgd_test", 42)
|
||||
assert(tm.gd("_lua_delgd_test") == 42)
|
||||
tm.delgd("_lua_delgd_test")
|
||||
assert(tm.gd("_lua_delgd_test") == nil)
|
||||
return 0
|
||||
end
|
||||
|
||||
return module
|
||||
@@ -180,6 +180,12 @@
|
||||
func_name: tuple_return
|
||||
param: [ 0, "OK" ]
|
||||
|
||||
- lua_func:
|
||||
name: delgd test
|
||||
key: $(test)_PASS
|
||||
file: $(test_path)$(psep)lua_func.lua
|
||||
func_name: test_delgd
|
||||
|
||||
- group:
|
||||
name: context_id tests
|
||||
steps:
|
||||
|
||||
@@ -47,3 +47,10 @@ def set_ns_value(val):
|
||||
def get_ns_value():
|
||||
obj = tm.gd("_py_ctx_ns_value", None)
|
||||
return obj.val if obj is not None else None
|
||||
|
||||
def test_delgd():
|
||||
tm.setgd("_py_delgd_test", 42)
|
||||
assert tm.gd("_py_delgd_test") == 42
|
||||
tm.delgd("_py_delgd_test")
|
||||
assert tm.gd("_py_delgd_test", None) is None
|
||||
return 0
|
||||
|
||||
@@ -190,6 +190,12 @@
|
||||
param: [ 0, "OK" ]
|
||||
expected_result: [0, "OK"]
|
||||
|
||||
- py_func:
|
||||
name: delgd test
|
||||
key: $(test)_PASS
|
||||
file: $(test_path)$(psep)py_func.py
|
||||
func_name: test_delgd
|
||||
|
||||
- group:
|
||||
name: context_id tests
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user