File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -488,6 +488,7 @@ function m.normalize(path)
488
488
end
489
489
end )
490
490
path = util .expandPath (path )
491
+ path = path :gsub (' ^%.[/\\ ]+' , ' ' )
491
492
if platform .OS == ' Windows' then
492
493
path = path :gsub (' [/\\ ]+' , ' \\ ' )
493
494
:gsub (' [/\\ ]+$' , ' ' )
Original file line number Diff line number Diff line change @@ -867,3 +867,28 @@ print(t.<?x?>)
867
867
]]
868
868
}
869
869
}
870
+
871
+ local originRuntimePath = config .get ' Lua.runtime.path'
872
+ config .set (' Lua.runtime.path' , {
873
+ ' ./?.lua'
874
+ })
875
+
876
+ TEST {
877
+ {
878
+ path = ' a.lua' ,
879
+ content = [[
880
+ return {
881
+ <!x!> = 1,
882
+ }
883
+ ]] ,
884
+ },
885
+ {
886
+ path = ' b.lua' ,
887
+ content = [[
888
+ local t = require 'a'
889
+ print(t.<?x?>)
890
+ ]]
891
+ }
892
+ }
893
+
894
+ config .set (' Lua.runtime.path' , originRuntimePath )
You can’t perform that action at this time.
0 commit comments