clean up data files after tests are finished.

This commit is contained in:
Enno Rehling 2014-11-04 08:06:46 +01:00
parent 93cdec9ddc
commit 93e20ac7a9
3 changed files with 3 additions and 0 deletions

View File

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

View File

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

View File

@ -50,6 +50,7 @@ static void test_group_readwrite(CuTest * tc)
CuAssertPtrEquals(tc, 0, f->groups->allies->next);
CuAssertPtrEquals(tc, f, f->groups->allies->faction);
CuAssertIntEquals(tc, HELP_GIVE, f->groups->allies->status);
remove("test.dat");
test_cleanup();
}