diff options
| author | TitanSnow <[email protected]> | 2017-05-21 09:31:30 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-05-21 09:50:52 +0800 |
| commit | 93fbbb2131cb92fd6d2c5dc64dea3ea54f6e4d64 (patch) | |
| tree | e0931b96f12eac6078d6862c382b8dd7a59c7e6c /tests/modules/os | |
| parent | 4f67991edadbedab69f36a7a3c73b44ff3f65ba6 (diff) | |
add test for os.setenv & os.mclock
Diffstat (limited to 'tests/modules/os')
| -rw-r--r-- | tests/modules/os/test.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/modules/os/test.lua b/tests/modules/os/test.lua index ffb81d3cc..681a2ec75 100644 --- a/tests/modules/os/test.lua +++ b/tests/modules/os/test.lua @@ -1,4 +1,6 @@ function main() + -- get mclock + local tm = os.mclock() -- test cpdir os.mkdir("test1") assert(os.exists("test1")) @@ -28,4 +30,9 @@ function main() assert(os.exists("test2/test1/test1")) os.rmdir("test2") assert(not os.exists("test2")) + -- test setenv + os.setenv("__AWD","DWA") + assert(os.getenv("__AWD")=="DWA") + -- assert mclock + assert(os.mclock()>=tm) end |
