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
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
cd $OLDWPD

View File

@ -1,6 +1,6 @@
if config.paths ~= nil then
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
print(package.path)

View File

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

View File

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