diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-03 10:18:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-03 10:18:44 -0300 |
commit | 7c5786479c1d617ec7c133f2c2b955726436267a (patch) | |
tree | 614cbcd89903fdbb06208a0c17196264da6a4166 /testes | |
parent | b14609032cf328dea48b0803f3e585e223283b3d (diff) | |
download | lua-7c5786479c1d617ec7c133f2c2b955726436267a.tar.gz lua-7c5786479c1d617ec7c133f2c2b955726436267a.tar.bz2 lua-7c5786479c1d617ec7c133f2c2b955726436267a.zip |
A few more improvements in 'luaO_pushvfstring'
- 'L' added to the 'BuffFS' structure
- '%c' does not handle control characters (it is not its business.
This now is done by the lexer, who is the one in charge of that
kind of errors.)
- avoid the direct use of 'l_sprintf' in the Lua kernel
Diffstat (limited to 'testes')
-rw-r--r-- | testes/strings.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/testes/strings.lua b/testes/strings.lua index bc123d1a..3e32f2c4 100644 --- a/testes/strings.lua +++ b/testes/strings.lua | |||
@@ -453,8 +453,7 @@ else | |||
453 | 453 | ||
454 | str = "abc %c def" | 454 | str = "abc %c def" |
455 | testpfs("I", str, string.byte("A")) | 455 | testpfs("I", str, string.byte("A")) |
456 | -- non-printable character | 456 | testpfs("I", str, 255) |
457 | assert(callpfs("I", str, 255) == "abc <\\255> def") | ||
458 | 457 | ||
459 | str = string.rep("a", blen - 1) .. "%p" .. string.rep("cd", blen) | 458 | str = string.rep("a", blen - 1) .. "%p" .. string.rep("cd", blen) |
460 | testpfs("P", str, {}) | 459 | testpfs("P", str, {}) |