From ba9cd0d25a022cf61c0b747d8e26f9ba81201112 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 24 Oct 2019 10:49:44 -0300 Subject: 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. --- testes/attrib.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'testes') diff --git a/testes/attrib.lua b/testes/attrib.lua index b1a4a199..76a447c8 100644 --- a/testes/attrib.lua +++ b/testes/attrib.lua @@ -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('+') -- cgit v1.2.3-55-g6feb