summaryrefslogtreecommitdiff
path: root/test/crossfile/definition.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/crossfile/definition.lua')
-rw-r--r--test/crossfile/definition.lua84
1 files changed, 64 insertions, 20 deletions
diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua
index f44633e1..aa971f3e 100644
--- a/test/crossfile/definition.lua
+++ b/test/crossfile/definition.lua
@@ -891,25 +891,69 @@ print(t.<?x?>)
}
}
---config.set('Lua.runtime.path', {
--- '/home/?.lua'
---})
---TEST {
--- {
--- path = '/home/a.lua',
--- content = [[
---return {
--- <!x!> = 1,
---}
---]],
--- },
--- {
--- path = 'b.lua',
--- content = [[
---local t = require 'a'
---print(t.<?x?>)
--- ]]
--- }
---}
+config.set('Lua.runtime.path', {
+ '/home/?.lua'
+})
+TEST {
+ {
+ path = '/home/a.lua',
+ content = [[
+return {
+ <!x!> = 1,
+}
+]],
+ },
+ {
+ path = 'b.lua',
+ content = [[
+local t = require 'a'
+print(t.<?x?>)
+ ]]
+ }
+}
+config.set('Lua.runtime.pathStrict', true)
+config.set('Lua.runtime.path', {
+ './?.lua'
+})
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+return {
+ <!x!> = 1,
+}
+]],
+ },
+ {
+ path = 'b.lua',
+ content = [[
+local t = require 'a'
+print(t.<?x?>)
+ ]]
+ }
+}
+
+config.set('Lua.runtime.path', {
+ '/home/?.lua'
+})
+TEST {
+ {
+ path = '/home/a.lua',
+ content = [[
+return {
+ <!x!> = 1,
+}
+]],
+ },
+ {
+ path = 'b.lua',
+ content = [[
+local t = require 'a'
+print(t.<?x?>)
+ ]]
+ }
+}
+
+config.set('Lua.runtime.pathStrict', false)
config.set('Lua.runtime.path', originRuntimePath)