瀏覽代碼

Small correction in test about 'isdst'

The field 'isdst' can be false, so we cannot test its absence with
'if not D.isdst'; we must compare with nil for a correct test.
Roberto Ierusalimschy 6 年之前
父節點
當前提交
20b161e285
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      testes/files.lua

+ 1 - 1
testes/files.lua

@@ -832,7 +832,7 @@ load(os.date([[!assert(D.year==%Y and D.month==%m and D.day==%d and
 do
   local D = os.date("*t")
   local t = os.time(D)
-  if not D.isdst then
+  if D.isdst == nil then
     print("no daylight saving information")
   else
     assert(type(D.isdst) == 'boolean')