aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandre alves garzia <andre@andregarzia.com>2017-02-11 15:28:32 -0200
committerandre alves garzia <andre@andregarzia.com>2017-02-11 15:28:32 -0200
commit0c771b8e521c4475f6764f31a322b7813c2062c7 (patch)
treee405cef6a2265df0c98233ad1c6868a31901cf9f
parent96858816371f16ee914145e7814488405845aca8 (diff)
downloadvalua-0c771b8e521c4475f6764f31a322b7813c2062c7.tar.gz
valua-0c771b8e521c4475f6764f31a322b7813c2062c7.tar.bz2
valua-0c771b8e521c4475f6764f31a322b7813c2062c7.zip
added tests for datetime
-rw-r--r--valua-test.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/valua-test.lua b/valua-test.lua
index 4554382..26d9444 100644
--- a/valua-test.lua
+++ b/valua-test.lua
@@ -1,4 +1,4 @@
-local v = require "valua"
+local v = require "valuaa"
local passing = true
local function check(val_test, test_value, expected, n)
@@ -34,7 +34,8 @@ local test_values = {
{},
{3,46},
"<script>alert('boohoo@email.com XSS');</script>",
- "test-123_maria.2@newdomain.wow.movie"
+ "test-123_maria.2@newdomain.wow.movie",
+ "10/06/1980 10:32:10"
}
local tests = {
@@ -59,7 +60,8 @@ local tests = {
{v:new().string(),{14,false,1,true}},
{v:new().string().alnum(),{6,false}},
{v:new().contains(" "),{2,false,1,true}},
- {v:new().no_white(),{1,false,2,true}}
+ {v:new().no_white(),{1,false,2,true}},
+ {v:new().datetime(),{19,true,9,false}}
}
for n,t in ipairs(tests) do