clean up after tests

update runtests.bat script for windows development in VS2015
This commit is contained in:
Enno Rehling 2015-10-11 14:57:35 +02:00
parent 6a074fd294
commit a3c843f90d
4 changed files with 7 additions and 3 deletions

View File

@ -45,7 +45,7 @@ function test_flags()
eressea.write_game("test.dat") eressea.write_game("test.dat")
eressea.free_game() eressea.free_game()
eressea.read_game("test.dat") eressea.read_game("test.dat")
os.remove('test.dat') os.remove('data/test.dat')
f = get_faction(no) f = get_faction(no)
assert_equal(flags, f.flags) assert_equal(flags, f.flags)
end end

View File

@ -104,7 +104,7 @@ function test_process_quit()
eressea.write_game('test.dat') eressea.write_game('test.dat')
eressea.free_game() eressea.free_game()
eressea.read_game('test.dat') eressea.read_game('test.dat')
os.remove('test.dat') os.remove('data/test.dat')
assert_equal(nil, _G.get_faction(fno)) assert_equal(nil, _G.get_faction(fno))
end end

View File

@ -28,4 +28,5 @@ function test_store_unit()
store:close() store:close()
assert_not_nil(u) assert_not_nil(u)
assert_equal(u:get_item("money"), u.number * 100) assert_equal(u:get_item("money"), u.number * 100)
os.remove(filename)
end end

View File

@ -1,5 +1,8 @@
@ECHO OFF @ECHO OFF
SET BUILD=..\build-vs12\eressea\Debug\ IF EXIST ..\build-vs10 SET BUILD=..\build-vs10\eressea\Debug
IF EXIST ..\build-vs11 SET BUILD=..\build-vs11\eressea\Debug
IF EXIST ..\build-vs12 SET BUILD=..\build-vs12\eressea\Debug
IF EXIST ..\build-vs14 SET BUILD=..\build-vs14\eressea\Debug
SET SERVER=%BUILD%\eressea.exe SET SERVER=%BUILD%\eressea.exe
%BUILD%\test_eressea.exe %BUILD%\test_eressea.exe
%SERVER% ..\scripts\run-tests.lua %SERVER% ..\scripts\run-tests.lua