Commit Diff


commit - 714f91aea957bffd596a40fbcdb52db47a64fe10
commit + 9107d4316c312c83240732273acb529314291021
blob - /dev/null
blob + a4135b067b0fed8f3c37b75481c1ad283aa7776e (mode 644)
--- /dev/null
+++ tests/tarantool_datetime_parse.lua
@@ -0,0 +1,26 @@
+local datetime = require("datetime")
+local luzer = require("luzer")
+
+local function TestOneInput(buf)
+    pcall(datetime.parse, buf)
+end
+
+if arg[1] then
+    local fh = io.open(arg[1])
+    local testcase = fh:read("*all")
+    TestOneInput(testcase)
+    os.exit()
+end
+
+local script_path = debug.getinfo(1).source:match("@?(.*/)")
+
+local args = {
+    detect_leaks = 1,
+    print_pcs = 1,
+    corpus = script_path .. "tarantool-corpus/datetime_parse",
+    artifact_prefix = "datetime_parse_",
+    max_len = 2048,
+    max_total_time = 60,
+    print_final_stats = 1,
+}
+luzer.Fuzz(TestOneInput, nil, args)