aboutsummaryrefslogtreecommitdiff
path: root/testes/files.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-13 11:43:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-13 11:43:10 -0300
commit3b9dd52be02fd43c598f4adb6fa7844e6a573923 (patch)
tree8f858942f5db0e3d9d7cad503b59ee1541a60aa6 /testes/files.lua
parent7dc6aae29057c9dc4588f780c7abd72a62ff4c8e (diff)
downloadlua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.tar.gz
lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.tar.bz2
lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.zip
Collective declaration for globals ('global *')
Diffstat (limited to 'testes/files.lua')
-rw-r--r--testes/files.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/testes/files.lua b/testes/files.lua
index a0ae661c..c2b355fb 100644
--- a/testes/files.lua
+++ b/testes/files.lua
@@ -1,6 +1,8 @@
1-- $Id: testes/files.lua $ 1-- $Id: testes/files.lua $
2-- See Copyright Notice in file lua.h 2-- See Copyright Notice in file lua.h
3 3
4global * <const>
5
4local debug = require "debug" 6local debug = require "debug"
5 7
6local maxint = math.maxinteger 8local maxint = math.maxinteger
@@ -838,13 +840,13 @@ assert(os.date("!\0\0") == "\0\0")
838local x = string.rep("a", 10000) 840local x = string.rep("a", 10000)
839assert(os.date(x) == x) 841assert(os.date(x) == x)
840local t = os.time() 842local t = os.time()
841D = os.date("*t", t) 843global D; D = os.date("*t", t)
842assert(os.date(string.rep("%d", 1000), t) == 844assert(os.date(string.rep("%d", 1000), t) ==
843 string.rep(os.date("%d", t), 1000)) 845 string.rep(os.date("%d", t), 1000))
844assert(os.date(string.rep("%", 200)) == string.rep("%", 100)) 846assert(os.date(string.rep("%", 200)) == string.rep("%", 100))
845 847
846local function checkDateTable (t) 848local function checkDateTable (t)
847 _G.D = os.date("*t", t) 849 D = os.date("*t", t)
848 assert(os.time(D) == t) 850 assert(os.time(D) == t)
849 load(os.date([[assert(D.year==%Y and D.month==%m and D.day==%d and 851 load(os.date([[assert(D.year==%Y and D.month==%m and D.day==%d and
850 D.hour==%H and D.min==%M and D.sec==%S and 852 D.hour==%H and D.min==%M and D.sec==%S and