Skip to content
Snippets Groups Projects
Commit 73a39ad3 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Add a test case for string.hex()

Closes #2522
parent 0ca6cb87
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
local tap = require('tap')
local test = tap.test("string extensions")
test:plan(3)
test:plan(4)
test:test("split", function(test)
test:plan(10)
......@@ -98,4 +98,10 @@ test:test("startswith/endswith", function(test)
test:ok(not ("12345"):endswith("345", 4, 5) , "bad endswith with good begin/end")
end)
test:test("hex", function(test)
test:plan(2)
test:is(string.hex("hello"), "68656c6c6f", "hex non-empty string")
test:is(string.hex(""), "", "hex empty string")
end)
os.exit(test:check() == true and 0 or -1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment