forked from github/server
clean up data files after tests are finished.
This commit is contained in:
parent
93cdec9ddc
commit
93e20ac7a9
|
@ -45,6 +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')
|
||||||
f = get_faction(no)
|
f = get_faction(no)
|
||||||
assert_equal(flags, f.flags)
|
assert_equal(flags, f.flags)
|
||||||
end
|
end
|
||||||
|
|
|
@ -105,6 +105,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')
|
||||||
assert_equal(nil, _G.get_faction(fno))
|
assert_equal(nil, _G.get_faction(fno))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ static void test_group_readwrite(CuTest * tc)
|
||||||
CuAssertPtrEquals(tc, 0, f->groups->allies->next);
|
CuAssertPtrEquals(tc, 0, f->groups->allies->next);
|
||||||
CuAssertPtrEquals(tc, f, f->groups->allies->faction);
|
CuAssertPtrEquals(tc, f, f->groups->allies->faction);
|
||||||
CuAssertIntEquals(tc, HELP_GIVE, f->groups->allies->status);
|
CuAssertIntEquals(tc, HELP_GIVE, f->groups->allies->status);
|
||||||
|
remove("test.dat");
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue