Merge pull request #58 from badgerman/master

Accepting Don's changes to the setup script, adding tests.
This commit is contained in:
Enno Rehling 2014-11-26 18:38:03 +01:00
commit 66f733e105
2 changed files with 11 additions and 0 deletions

View File

@ -91,4 +91,7 @@ ini_add lua install $SOURCE
ini_add lua paths $SOURCE/scripts:$SOURCE/lunit ini_add lua paths $SOURCE/scripts:$SOURCE/lunit
ini_add lua rules $rules ini_add lua rules $rules
ln -f $SOURCE/bin/eressea
ln -f $SOURCE/scripts/run-turn.lua ln -f $SOURCE/scripts/run-turn.lua
ln -f $SOURCE/scripts/reports.lua
ln -f $SOURCE/scripts/config.lua

View File

@ -18,3 +18,11 @@ function test_faction_flags()
f.flags = 42 f.flags = 42
assert_equal(42, f.flags) assert_equal(42, f.flags)
end end
function test_get_faction()
assert_equal(f, get_faction(f.id))
assert_equal(f, faction.get(f.id))
local nf = f.id
if nf>1 then nf = nf - 1 else nf = 1 end
assert_equal(nil, faction.get(nf))
end