aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to 'testes')
-rw-r--r--testes/files.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/testes/files.lua b/testes/files.lua
index 34fcf851..0a05cf60 100644
--- a/testes/files.lua
+++ b/testes/files.lua
@@ -777,7 +777,7 @@ local t = os.time()
777D = os.date("*t", t) 777D = os.date("*t", t)
778load(os.date([[assert(D.year==%Y and D.month==%m and D.day==%d and 778load(os.date([[assert(D.year==%Y and D.month==%m and D.day==%d and
779 D.hour==%H and D.min==%M and D.sec==%S and 779 D.hour==%H and D.min==%M and D.sec==%S and
780 D.wday==%w+1 and D.yday==%j and type(D.isdst) == 'boolean')]], t))() 780 D.wday==%w+1 and D.yday==%j)]], t))()
781 781
782checkerr("invalid conversion specifier", os.date, "%") 782checkerr("invalid conversion specifier", os.date, "%")
783checkerr("invalid conversion specifier", os.date, "%9") 783checkerr("invalid conversion specifier", os.date, "%9")
@@ -827,12 +827,16 @@ end
827D = os.date("!*t", t) 827D = os.date("!*t", t)
828load(os.date([[!assert(D.year==%Y and D.month==%m and D.day==%d and 828load(os.date([[!assert(D.year==%Y and D.month==%m and D.day==%d and
829 D.hour==%H and D.min==%M and D.sec==%S and 829 D.hour==%H and D.min==%M and D.sec==%S and
830 D.wday==%w+1 and D.yday==%j and type(D.isdst) == 'boolean')]], t))() 830 D.wday==%w+1 and D.yday==%j)]], t))()
831 831
832do 832do
833 local D = os.date("*t") 833 local D = os.date("*t")
834 local t = os.time(D) 834 local t = os.time(D)
835 assert(type(D.isdst) == 'boolean') 835 if not D.isdst then
836 print("no daylight saving information")
837 else
838 assert(type(D.isdst) == 'boolean')
839 end
836 D.isdst = nil 840 D.isdst = nil
837 local t1 = os.time(D) 841 local t1 = os.time(D)
838 assert(t == t1) -- if isdst is absent uses correct default 842 assert(t == t1) -- if isdst is absent uses correct default