From 1eee96e996e1dd02d585e43fa854f9e9bef93db1 Mon Sep 17 00:00:00 2001 From: Sylvain Glaize Date: Mon, 15 Dec 2025 22:08:04 +0100 Subject: [PATCH] TestRunner: Fix Lua require() Make the path creation in --testrunner mode coherent with the path creation in ScriptWindowViewModel.cs so that require() in Lua scripts can result the same way. --- UI/Utilities/TestRunner.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/Utilities/TestRunner.cs b/UI/Utilities/TestRunner.cs index a6ca138fe..4ada0cb68 100644 --- a/UI/Utilities/TestRunner.cs +++ b/UI/Utilities/TestRunner.cs @@ -42,7 +42,8 @@ internal static int Run(string[] args) foreach(string luaScript in commandLineHelper.LuaScriptsToLoad) { try { string script = File.ReadAllText(luaScript); - DebugApi.LoadScript(luaScript, Path.GetDirectoryName(luaScript) ?? Program.OriginalFolder, script); + string path = (Path.GetDirectoryName(luaScript) ?? Program.OriginalFolder) + Path.DirectorySeparatorChar; + int scriptId = DebugApi.LoadScript(luaScript, path, script); } catch { } }