add a unit test for wesnoth.require

This commit is contained in:
Chris Beck 2014-12-06 23:32:29 -05:00
parent 69d7924df5
commit d1d0990235
2 changed files with 14 additions and 0 deletions

View 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]
)}

View file

@ -86,6 +86,7 @@
# LUA
#
0 lua_dofile
0 lua_require
#
# Pathfinding
#