Skip to content
This repository was archived by the owner on Sep 10, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions spec/base32_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,10 @@ describe Base32 do
Base32.hex_decode_string("CPNMUOJ1").should eq("fooba")
Base32.hex_decode_string("CPNMUOJ1E8").should eq("foobar")
end

it "encodes/decodes with NUL bytes" do
str = "\0foo\0bar\0"
str2 = Base32.decode_string(Base32.encode(str))
str2.should eq str
end
end