aboutsummaryrefslogtreecommitdiff
path: root/testes/files.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testes/files.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/testes/files.lua b/testes/files.lua
index 53edf314..7146ac7c 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
@@ -478,7 +480,7 @@ do print("testing flush")
478end 480end
479 481
480 482
481-- test for multipe arguments in 'lines' 483-- test for multiple arguments in 'lines'
482io.output(file); io.write"0123456789\n":close() 484io.output(file); io.write"0123456789\n":close()
483for a,b in io.lines(file, 1, 1) do 485for a,b in io.lines(file, 1, 1) do
484 if a == "\n" then assert(not b) 486 if a == "\n" then assert(not b)
@@ -713,7 +715,7 @@ do
713end 715end
714 716
715 717
716if T and T.nonblock then 718if T and T.nonblock and not _port then
717 print("testing failed write") 719 print("testing failed write")
718 720
719 -- unable to write anything to /dev/full 721 -- unable to write anything to /dev/full
@@ -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 = 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