diff options
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index 3f29a28c0d..98f003f208 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -99,6 +99,9 @@ function module.pcall_err(fn, ...) -- to this: -- Error executing lua: .../foo.lua:186: Expected string, got number errmsg = errmsg:gsub([[lua: [a-zA-Z]?:?[^:]-[/\]([^:/\]+):%d+: ]], 'lua: .../%1: ') + -- Compiled modules will not have a path and will just be a name like + -- shared.lua:186, so strip the number. + errmsg = errmsg:gsub([[lua: ([^:/\ ]+):%d+: ]], 'lua: .../%1: ') -- ^ Windows drive-letter (C:) return errmsg end |