aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThibault Charbonnier <thibaultcha@me.com>2015-11-07 01:53:33 -0800
committerThibault Charbonnier <thibaultcha@me.com>2015-11-07 02:02:03 -0800
commit03617b9a8cede011d5dbd7009bf7dab00ba67806 (patch)
treef2fbc2aab8f30bffdf8e2c3b6012de443e3d0274 /test
parentb1696f33dd7ae2b621ad8d04f1547df57731d6d0 (diff)
downloadlua_uuid-03617b9a8cede011d5dbd7009bf7dab00ba67806.tar.gz
lua_uuid-03617b9a8cede011d5dbd7009bf7dab00ba67806.tar.bz2
lua_uuid-03617b9a8cede011d5dbd7009bf7dab00ba67806.zip
feat: made the module return a function
- also add lua lib path to the .so creation to ensure compilation (generally lua header files are not in the standrard compiler's search paths) - remove boilerplate - bare minimum of tests additions
Diffstat (limited to 'test')
-rw-r--r--test/lua_uuid_test.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/lua_uuid_test.lua b/test/lua_uuid_test.lua
index 3cc44c2..19ebf67 100644
--- a/test/lua_uuid_test.lua
+++ b/test/lua_uuid_test.lua
@@ -1,8 +1,11 @@
-local lua_uuid = require "lua_uuid"
+package.path = package.path..";./?.lua"
-assert(lua_uuid.generate())
+local uuid = require "lua_uuid"
-local first = lua_uuid.generate()
-local second = lua_uuid.generate()
+assert(type(uuid) == "function")
-assert(first ~= second) \ No newline at end of file
+local first = uuid()
+local second = uuid()
+
+assert(first ~= second)
+assert(type(uuid()) == "string")