diff options
author | Marco Palladino <marco@mashape.com> | 2015-11-09 10:41:29 -0800 |
---|---|---|
committer | Marco Palladino <marco@mashape.com> | 2015-11-09 10:41:29 -0800 |
commit | c451d2262211af9331de5997a24d8ec4bacbef1e (patch) | |
tree | 671174dcc5898f12e798af456749a7ae259a94c1 /test/lua_uuid_test.lua | |
parent | dc4c9f1d2b51a72cbd66ddeff1a2880d6b99d57c (diff) | |
parent | 03617b9a8cede011d5dbd7009bf7dab00ba67806 (diff) | |
download | lua_uuid-c451d2262211af9331de5997a24d8ec4bacbef1e.tar.gz lua_uuid-c451d2262211af9331de5997a24d8ec4bacbef1e.tar.bz2 lua_uuid-c451d2262211af9331de5997a24d8ec4bacbef1e.zip |
Merge pull request #1 from Mashape/feat/direct-function
feat: made the module return a function
Diffstat (limited to 'test/lua_uuid_test.lua')
-rw-r--r-- | test/lua_uuid_test.lua | 13 |
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") |