passwords are write-only, cannot read them in tests

This commit is contained in:
Enno Rehling 2016-01-12 07:25:57 +01:00
parent b6d44410b7
commit ae0206652e
2 changed files with 4 additions and 4 deletions

View file

@ -1083,7 +1083,8 @@ function test_parser()
local file = io.open(filename, "w")
assert_not_nil(file)
file:write('ERESSEA ' .. itoa36(f.id) .. ' "' .. f.password .. '"\n')
f.password = 'Hodor'
file:write('ERESSEA ' .. itoa36(f.id) .. ' "Hodor"\n')
file:write('EINHEIT ' .. itoa36(u.id) .. "\n")
file:write("BENENNEN EINHEIT 'Goldene Herde'\n")
file:close()

View file

@ -73,12 +73,10 @@ function test_process_settings()
f.options = 0
u:add_order("EMAIL herp@derp.com")
u:add_order("BANNER 'Herpderp'")
u:add_order("PASSWORT 'HerpDerp'")
u:add_order("OPTION AUSWERTUNG")
eressea.process.settings()
assert_equal("herp@derp.com", f.email)
assert_equal("Herpderp", f.info)
assert_equal("HerpDerp", f.password)
assert_equal(1, f.options)
end
@ -98,7 +96,8 @@ end
function test_process_quit()
fno = f.id
u:add_order("STIRB '" .. u.faction.password .. "'")
u.faction.password = 'Hodor'
u:add_order("STIRB 'Hodor'")
assert_not_equal(nil, _G.get_faction(fno))
eressea.process.quit()
eressea.write_game('test.dat')