Skip to content

Commit

Permalink
add a unit test for wesnoth.require
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Dec 7, 2014
1 parent 69d7924 commit d1d0990
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions data/test/scenarios/test_require.cfg
@@ -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]
)}
1 change: 1 addition & 0 deletions wml_test_schedule
Expand Up @@ -86,6 +86,7 @@
# LUA
#
0 lua_dofile
0 lua_require
#
# Pathfinding
#
Expand Down

0 comments on commit d1d0990

Please sign in to comment.