aboutsummaryrefslogtreecommitdiff
path: root/testes/utf8.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 14:58:02 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 14:58:02 -0300
commitb96b0b5abbf40cbdbed7952bf35a5a27ddf75928 (patch)
tree5d9d5463cb7d3424833abab20dd87bce1f4b240f /testes/utf8.lua
parentca13be9af784b7288d3a07d9b5bccb329086e885 (diff)
downloadlua-b96b0b5abbf40cbdbed7952bf35a5a27ddf75928.tar.gz
lua-b96b0b5abbf40cbdbed7952bf35a5a27ddf75928.tar.bz2
lua-b96b0b5abbf40cbdbed7952bf35a5a27ddf75928.zip
Added macro 'luaL_pushfail'
The macro 'luaL_pushfail' documents all places in the standard libraries that return nil to signal some kind of failure. It is defined as 'lua_pushnil'. The manual also got a notation (@fail) to document those returns. The tests were changed to be agnostic regarding whether 'fail' is 'nil' or 'false'.
Diffstat (limited to '')
-rw-r--r--testes/utf8.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/testes/utf8.lua b/testes/utf8.lua
index acbb181d..5954f6e8 100644
--- a/testes/utf8.lua
+++ b/testes/utf8.lua
@@ -30,8 +30,8 @@ local function checksyntax (s, t)
30 assert(assert(load(ts))() == s) 30 assert(assert(load(ts))() == s)
31end 31end
32 32
33assert(utf8.offset("alo", 5) == nil) 33assert(not utf8.offset("alo", 5))
34assert(utf8.offset("alo", -4) == nil) 34assert(not utf8.offset("alo", -4))
35 35
36-- 'check' makes several tests over the validity of string 's'. 36-- 'check' makes several tests over the validity of string 's'.
37-- 't' is the list of codepoints of 's'. 37-- 't' is the list of codepoints of 's'.