diff --git a/test/app-tap/string.test.lua b/test/app-tap/string.test.lua index 5198830d23fb02e5af18fb83d4872c2e52a1c1a4..a50f506177e20ffe3e554d0e1888421169c32ddb 100755 --- a/test/app-tap/string.test.lua +++ b/test/app-tap/string.test.lua @@ -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)