fix pool test (GiveRestriction broke it).

- do not default to loading the E2 rules for tests, so GiveRestriction
will not be set to a default value.
- only load configuration if a ruleset has been defined.
This commit is contained in:
Enno Rehling 2015-05-24 09:09:34 +02:00
parent 3e93ebfcb7
commit e9992db51c
3 changed files with 4 additions and 5 deletions

1
.gitignore vendored
View File

@ -36,3 +36,4 @@ game-e3/reports/
*.log.*
tags
Thumbs.db
.gdb_history

View File

@ -12,7 +12,6 @@ locales = de,en
install = .
paths = lunit:scripts
maxnmrs = 20
rules = e2
[editor]
color = 1

View File

@ -2,9 +2,8 @@ local confdir = 'conf/'
if config.install then
confdir = config.install .. '/' .. confdir
end
rules=''
if config.rules then
rules = config.rules .. '/'
local rules = config.rules .. '/'
assert(0 == read_xml(confdir .. rules .. 'config.xml', confdir .. rules .. 'catalog.xml'), "could not load XML data, did you compile with LIBXML2 ?")
assert(0 == eressea.config.read(rules .. 'config.json', confdir), "could not read JSON data")
end
assert(0 == read_xml(confdir .. rules .. 'config.xml', confdir .. rules .. 'catalog.xml'), "could not load XML data, did you compile with LIBXML2 ?")
assert(0 == eressea.config.read(rules .. 'config.json', confdir), "could not read JSON data")