summaryrefslogtreecommitdiff
path: root/tests/modules/os/test.lua
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-05-21 08:19:06 +0800
committerTitanSnow <[email protected]>2017-05-21 09:50:52 +0800
commit9aeced3ae3e4fc43631208ed6e54ce256ce184aa (patch)
tree3a9a1d66432a09df03f9b9643c70c71bccc271e0 /tests/modules/os/test.lua
parent573618951446177bb2378f5852466e15153366e8 (diff)
add test for os directory operation
Diffstat (limited to 'tests/modules/os/test.lua')
-rw-r--r--tests/modules/os/test.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/modules/os/test.lua b/tests/modules/os/test.lua
new file mode 100644
index 000000000..29dbbcc39
--- /dev/null
+++ b/tests/modules/os/test.lua
@@ -0,0 +1,11 @@
+function main()
+ os.mkdir("test1")
+ assert(os.exists("test1"))
+ os.cp("test1","test2")
+ assert(os.exists("test2"))
+ os.rmdir("test1")
+ assert(not os.exists("test1"))
+ io.writefile("test2/awd","awd")
+ os.rmdir("test2")
+ assert(not os.exists("test2"))
+end