mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-15 01:29:11 +00:00
add a unit test for wesnoth.require
This commit is contained in:
parent
69d7924df5
commit
d1d0990235
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…
x
Reference in New Issue
Block a user