Change in the prefix of messages from searchers
The initial "\n\t" to properly indent a searcher message is being added by 'findloader' when building the error message, instead of being included in the original message by each searcher itself.
This commit is contained in:
@@ -47,6 +47,29 @@ do
|
||||
package.path = oldpath
|
||||
end
|
||||
|
||||
|
||||
do print"testing 'require' message"
|
||||
local oldpath = package.path
|
||||
local oldcpath = package.cpath
|
||||
|
||||
package.path = "?.lua;?/?"
|
||||
package.cpath = "?.so;?/init"
|
||||
|
||||
local st, msg = pcall(require, 'XXX')
|
||||
|
||||
local expected = [[module 'XXX' not found:
|
||||
no field package.preload['XXX']
|
||||
no file 'XXX.lua'
|
||||
no file 'XXX/XXX'
|
||||
no file 'XXX.so'
|
||||
no file 'XXX/init']]
|
||||
|
||||
assert(msg == expected)
|
||||
|
||||
package.path = oldpath
|
||||
package.cpath = oldcpath
|
||||
end
|
||||
|
||||
print('+')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user