diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-10-24 10:49:44 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-10-24 10:49:44 -0300 |
| commit | ba9cd0d25a022cf61c0b747d8e26f9ba81201112 (patch) | |
| tree | a07ae4d2d273ab438d3c7db9b61f157af5fc17cd /testes | |
| parent | b93f3b00bb76cddbf600eb399849fb0c01d197fd (diff) | |
| download | lua-ba9cd0d25a022cf61c0b747d8e26f9ba81201112.tar.gz lua-ba9cd0d25a022cf61c0b747d8e26f9ba81201112.tar.bz2 lua-ba9cd0d25a022cf61c0b747d8e26f9ba81201112.zip | |
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.
Diffstat (limited to 'testes')
| -rw-r--r-- | testes/attrib.lua | 23 |
1 files changed, 23 insertions, 0 deletions
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 | |||
| 47 | package.path = oldpath | 47 | package.path = oldpath |
| 48 | end | 48 | end |
| 49 | 49 | ||
| 50 | |||
| 51 | do print"testing 'require' message" | ||
| 52 | local oldpath = package.path | ||
| 53 | local oldcpath = package.cpath | ||
| 54 | |||
| 55 | package.path = "?.lua;?/?" | ||
| 56 | package.cpath = "?.so;?/init" | ||
| 57 | |||
| 58 | local st, msg = pcall(require, 'XXX') | ||
| 59 | |||
| 60 | local expected = [[module 'XXX' not found: | ||
| 61 | no field package.preload['XXX'] | ||
| 62 | no file 'XXX.lua' | ||
| 63 | no file 'XXX/XXX' | ||
| 64 | no file 'XXX.so' | ||
| 65 | no file 'XXX/init']] | ||
| 66 | |||
| 67 | assert(msg == expected) | ||
| 68 | |||
| 69 | package.path = oldpath | ||
| 70 | package.cpath = oldcpath | ||
| 71 | end | ||
| 72 | |||
| 50 | print('+') | 73 | print('+') |
| 51 | 74 | ||
| 52 | 75 | ||
