File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 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)
488488 end
489489 end )
490490 path = util .expandPath (path )
491+ path = path :gsub (' ^%.[/\\ ]+' , ' ' )
491492 if platform .OS == ' Windows' then
492493 path = path :gsub (' [/\\ ]+' , ' \\ ' )
493494 :gsub (' [/\\ ]+$' , ' ' )
Original file line number Diff line number Diff line change @@ -867,3 +867,28 @@ print(t.<?x?>)
867867 ]]
868868 }
869869}
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