Commit 7d53676
committed
tests/lapi: fix assertion with result in os_time_test
The `mktime()` function (which is used inside `os.time()`)
returns -1 for cases when the time since the Epoch cannot be
represented. In this case, `os.time()` returns `nil`:
```
luajit -e "print(os.time({year = 1970, month = 1, day = 1, sec = -9 * 60 * 60 - 1}))"
nil
```
The patch fixes an assertion in the test and allows `nil` as
a result of the function.
Follows up #1411 parent de2f1ab commit 7d53676
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
0 commit comments