summaryrefslogtreecommitdiff
path: root/testes/tpack.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-08 14:22:32 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-08 14:22:32 -0200
commit264659bd53e92969a1e17d65c0266597cde24b5d (patch)
tree6aba62d2b6ac2a46dc064ea7193c8134200a7d57 /testes/tpack.lua
parent4ace93ca6502dd1da38d5c06fa099d229e791ba8 (diff)
downloadlua-264659bd53e92969a1e17d65c0266597cde24b5d.tar.gz
lua-264659bd53e92969a1e17d65c0266597cde24b5d.tar.bz2
lua-264659bd53e92969a1e17d65c0266597cde24b5d.zip
Optional 'init' argument to 'string.gmatch'
The function 'string.gmatch' now has an optional 'init' argument, similar to 'string.find' and 'string.match'. Moreover, there was some reorganization in the manipulation of indices in the string library. This commit also includes small janitorial work in the manual and in comments in the interpreter loop.
Diffstat (limited to 'testes/tpack.lua')
-rw-r--r--testes/tpack.lua2
1 files changed, 0 insertions, 2 deletions
diff --git a/testes/tpack.lua b/testes/tpack.lua
index 4c5fc7f7..2b9953f8 100644
--- a/testes/tpack.lua
+++ b/testes/tpack.lua
@@ -314,9 +314,7 @@ do -- testing initial position
314 for i = 1, #x + 1 do 314 for i = 1, #x + 1 do
315 assert(unpack("c0", x, i) == "") 315 assert(unpack("c0", x, i) == "")
316 end 316 end
317 checkerror("out of string", unpack, "c0", x, 0)
318 checkerror("out of string", unpack, "c0", x, #x + 2) 317 checkerror("out of string", unpack, "c0", x, #x + 2)
319 checkerror("out of string", unpack, "c0", x, -(#x + 1))
320 318
321end 319end
322 320