replace backslash with forward for unix-style paths

This commit is contained in:
Enno Rehling 2014-08-03 12:43:16 +02:00
parent 9cb0deb4f9
commit ebe078df61
4 changed files with 9 additions and 11 deletions

View File

@ -17,6 +17,6 @@ fi
$ROOT/$BIN_DIR/eressea/test_eressea $ROOT/$BIN_DIR/eressea/test_eressea
cd $ROOT cd $ROOT
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/runtests.lua $ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests.lua
#grep ERROR eressea.log #grep ERROR eressea.log
cd $OLDWPD cd $OLDWPD

View File

@ -1,6 +1,6 @@
if config.paths ~= nil then if config.paths ~= nil then
for path in string.gmatch(config.paths, "([^:]+)") do for path in string.gmatch(config.paths, "([^:]+)") do
package.path = package.path .. ';' .. path .. '\\?.lua;' .. path .. '\\?\\init.lua' package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
end end
end end
print(package.path) print(package.path)

View File

@ -2,14 +2,12 @@
path = 'scripts' path = 'scripts'
if config.source_dir ~= nil then if config.source_dir ~= nil then
path = config.source_dir .. '\\' .. path path = config.source_dir .. '/' .. path
end end
package.path = package.path .. ';' .. path .. '\\?.lua;' .. path .. '\\?\\init.lua' package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
-- require 'eressea.tests' require 'eressea'
if config.rules ~= nil then require 'eressea.tests'
require ('eressea.' .. config.rules .. '.tests')
end
require 'lunit' require 'lunit'
read_xml()
lunit.main() lunit.main()

View File

@ -183,9 +183,9 @@ end
path = 'scripts' path = 'scripts'
if config.source_dir ~= nil then if config.source_dir ~= nil then
path = config.source_dir .. '\\' .. path path = config.source_dir .. '/' .. path
end end
package.path = package.path .. ';' .. path .. '\\?.lua;' .. path .. '\\?\\init.lua' package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
rules = require('eressea.' .. config.rules) rules = require('eressea.' .. config.rules)
read_xml() read_xml()