aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test.lua b/tests/test.lua
index 3ace810..5d00e44 100644
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -79,6 +79,19 @@ assert (new_att.modification == testdate, "could not set modification time")
79io.write(".") 79io.write(".")
80io.flush() 80io.flush()
81 81
82-- High-precision attributes
83local testdate_hi = os.time({ year = 2021, day = 1, month = 23, hour=0}) + 0.5555
84assert (lfs.touch (tmpfile, testdate_hi))
85local new_att_hi = assert (lfs.attributes (tmpfile))
86if new_att_hi.modification ~= testdate_hi then
87 io.write("\n")
88 io.write("warning: no support for high-precision timestamps\n")
89 io.flush()
90end
91
92io.write(".")
93io.flush()
94
82-- Change access and modification time 95-- Change access and modification time
83local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0}) 96local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0})
84local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0}) 97local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0})
@@ -194,7 +207,7 @@ io.write(".")
194io.flush() 207io.flush()
195 208
196-- Stressing directory iterator 209-- Stressing directory iterator
197count = 0 210local count = 0
198for i = 1, 4000 do 211for i = 1, 4000 do
199 for file in lfs.dir (tmp) do 212 for file in lfs.dir (tmp) do
200 count = count + 1 213 count = count + 1