From 93fbbb2131cb92fd6d2c5dc64dea3ea54f6e4d64 Mon Sep 17 00:00:00 2001 From: TitanSnow Date: Sun, 21 May 2017 09:31:30 +0800 Subject: add test for os.setenv & os.mclock --- tests/modules/os/test.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/modules/os/test.lua') 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 -- cgit v1.3.1