add a unit test for wesnoth.require
This commit is contained in:
parent
69d7924df5
commit
d1d0990235
2 changed files with 14 additions and 0 deletions
13
data/test/scenarios/test_require.cfg
Normal file
13
data/test/scenarios/test_require.cfg
Normal file
|
@ -0,0 +1,13 @@
|
|||
{GENERIC_UNIT_TEST "lua_require" (
|
||||
[event]
|
||||
name = prestart
|
||||
[lua]
|
||||
code = << H = wesnoth.require("lua/helper.lua")
|
||||
A = wesnoth.require("ai/lua/extCAexample.lua")
|
||||
result = H and A and true
|
||||
wesnoth.set_variable("result", result and "true" or "false") >>
|
||||
[/lua]
|
||||
|
||||
{RETURN ({VARIABLE_CONDITIONAL result boolean_equals true})}
|
||||
[/event]
|
||||
)}
|
|
@ -86,6 +86,7 @@
|
|||
# LUA
|
||||
#
|
||||
0 lua_dofile
|
||||
0 lua_require
|
||||
#
|
||||
# Pathfinding
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue