diff options
Diffstat (limited to 'tests/test.lua')
-rw-r--r-- | tests/test.lua | 15 |
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") | |||
79 | io.write(".") | 79 | io.write(".") |
80 | io.flush() | 80 | io.flush() |
81 | 81 | ||
82 | -- High-precision attributes | ||
83 | local testdate_hi = os.time({ year = 2021, day = 1, month = 23, hour=0}) + 0.5555 | ||
84 | assert (lfs.touch (tmpfile, testdate_hi)) | ||
85 | local new_att_hi = assert (lfs.attributes (tmpfile)) | ||
86 | if 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() | ||
90 | end | ||
91 | |||
92 | io.write(".") | ||
93 | io.flush() | ||
94 | |||
82 | -- Change access and modification time | 95 | -- Change access and modification time |
83 | local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0}) | 96 | local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0}) |
84 | local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0}) | 97 | local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0}) |
@@ -194,7 +207,7 @@ io.write(".") | |||
194 | io.flush() | 207 | io.flush() |
195 | 208 | ||
196 | -- Stressing directory iterator | 209 | -- Stressing directory iterator |
197 | count = 0 | 210 | local count = 0 |
198 | for i = 1, 4000 do | 211 | for 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 |