2020-04-19 21:35:48 +02:00
|
|
|
local tcname = 'tests.settings'
|
2020-05-03 16:52:40 +02:00
|
|
|
local lunit = require('lunit')
|
2020-04-19 21:35:48 +02:00
|
|
|
if _VERSION >= 'Lua 5.2' then
|
|
|
|
_ENV = module(tcname, 'seeall')
|
|
|
|
else
|
2020-05-03 16:52:40 +02:00
|
|
|
module(tcname, lunit.testcase, package.seeall)
|
2020-04-19 21:35:48 +02:00
|
|
|
end
|
2014-06-13 02:41:03 +02:00
|
|
|
|
|
|
|
function setup()
|
|
|
|
eressea.free_game()
|
|
|
|
end
|
|
|
|
|
|
|
|
function test_settings()
|
2014-08-07 13:19:19 +02:00
|
|
|
assert_equal(nil, eressea.settings.get('foo'))
|
|
|
|
eressea.settings.set('foo', 'bar')
|
|
|
|
assert_equal('bar', eressea.settings.get('foo'))
|
2014-06-13 02:41:03 +02:00
|
|
|
end
|