forked from github/server
use boolean values in E2 config.
add a runtests.bat file for windows developers. make some tests clean up after themselves (os.remove on files they create).
This commit is contained in:
parent
c5e14c85a6
commit
1a9dd531c5
|
@ -41,3 +41,5 @@ Thumbs.db
|
|||
*.cmd
|
||||
tmp/
|
||||
tests/config.lua
|
||||
tests/reports/
|
||||
tests/data/185.dat
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
"game.id": 2,
|
||||
"game.name": "Eressea",
|
||||
"NewbieImmunity": 8,
|
||||
"modules.wormholes": 1,
|
||||
"modules.wormholes": true,
|
||||
"entertain.base": 0,
|
||||
"entertain.perlevel": 20,
|
||||
"nmr.timeout": 5,
|
||||
"nmr.removenewbie": 0,
|
||||
"GiveRestriction": 3,
|
||||
"hunger.long": 1,
|
||||
"hunger.long": true,
|
||||
"init_spells": 0,
|
||||
"world.era": 2,
|
||||
"seed.population.min": 8,
|
||||
"seed.population.max": 8,
|
||||
"rules.ship.damage_drift": 0.00,
|
||||
"rules.reserve.twophase": 1,
|
||||
"rules.reserve.twophase": true,
|
||||
"rules.give.max_men": "-1",
|
||||
"rules.check_overload": 0,
|
||||
"rules.check_overload": false,
|
||||
"rules.limit.faction": 2500,
|
||||
"rules.maxskills.magic": 5,
|
||||
"rules.guard.base_stop_prob": 0.30,
|
||||
|
|
|
@ -45,7 +45,7 @@ function test_flags()
|
|||
eressea.write_game("test.dat")
|
||||
eressea.free_game()
|
||||
eressea.read_game("test.dat")
|
||||
os.remove('test.dat')
|
||||
os.remove('data/test.dat')
|
||||
f = get_faction(no)
|
||||
assert_equal(flags, f.flags)
|
||||
end
|
||||
|
@ -194,6 +194,7 @@ function test_descriptions()
|
|||
eressea.write_game(filename)
|
||||
eressea.free_game()
|
||||
eressea.read_game(filename)
|
||||
os.remove("data/test.dat")
|
||||
assert_equal(info, get_ship(sno).info)
|
||||
assert_equal(info, get_unit(uno).info)
|
||||
assert_equal(info, get_faction(fno).info)
|
||||
|
@ -1081,5 +1082,6 @@ function test_parser()
|
|||
|
||||
eressea.read_orders(filename)
|
||||
process_orders()
|
||||
os.remove(filename)
|
||||
assert_equal("Goldene Herde", u.name)
|
||||
end
|
||||
|
|
|
@ -104,7 +104,7 @@ function test_process_quit()
|
|||
eressea.write_game('test.dat')
|
||||
eressea.free_game()
|
||||
eressea.read_game('test.dat')
|
||||
os.remove('test.dat')
|
||||
os.remove('data/test.dat')
|
||||
assert_equal(nil, _G.get_faction(fno))
|
||||
end
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ function test_store_unit()
|
|||
assert_not_nil(store)
|
||||
u = store:read_unit()
|
||||
store:close()
|
||||
os.remove(filename)
|
||||
assert_not_nil(u)
|
||||
assert_equal(u:get_item("money"), u.number * 100)
|
||||
end
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
@ECHO OFF
|
||||
SET BUILD=..\build-vs12\eressea\Debug\
|
||||
SET SERVER=%BUILD%\eressea.exe
|
||||
%BUILD%\test_eressea.exe
|
||||
%SERVER% ..\scripts\run-tests.lua
|
||||
%SERVER% ..\scripts\run-tests-e2.lua
|
||||
%SERVER% ..\scripts\run-tests-e3.lua
|
||||
PAUSE
|
||||
RMDIR /s /q reports
|
Loading…
Reference in New Issue