Skip to content

Commit 54c9087

Browse files
committed
Add Couple More Tests
1 parent 1496832 commit 54c9087

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test.lua

+12
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,15 @@ test("max length write", function()
8181
end)
8282
assert(output == "")
8383
end)
84+
85+
test("null read", function()
86+
with_input("4:\x00\x00\x00\x00,", function(stream)
87+
assert(netstring.read(stream) == "\x00\x00\x00\x00")
88+
end)
89+
end)
90+
91+
test("control char read", function()
92+
with_input("8::::,:,,,,", function(stream)
93+
assert(netstring.read(stream) == ":::,:,,,")
94+
end)
95+
end)

0 commit comments

Comments
 (0)