diff options
Diffstat (limited to 'tests/core/encoding')
| -rw-r--r-- | tests/core/encoding/base64/base64.odin | 17 | ||||
| -rw-r--r-- | tests/core/encoding/xml/test_core_xml.odin | 2 |
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/core/encoding/base64/base64.odin b/tests/core/encoding/base64/base64.odin index ed1bee8af..93b3afb59 100644 --- a/tests/core/encoding/base64/base64.odin +++ b/tests/core/encoding/base64/base64.odin @@ -50,4 +50,19 @@ test_roundtrip :: proc(t: ^testing.T) { for v, i in decoded { testing.expect_value(t, v, values[i]) } -}
\ No newline at end of file +} + +@(test) +test_base64url :: proc(t: ^testing.T) { + plain := ">>>" + url := "Pj4-" + + encoded := base64.encode(transmute([]byte)plain, base64.ENC_URL_TABLE) + defer delete(encoded) + testing.expect_value(t, encoded, url) + + decoded := string(base64.decode(url, base64.DEC_URL_TABLE)) + defer delete(decoded) + testing.expect_value(t, decoded, plain) + +} diff --git a/tests/core/encoding/xml/test_core_xml.odin b/tests/core/encoding/xml/test_core_xml.odin index 23d583e98..9f233e00e 100644 --- a/tests/core/encoding/xml/test_core_xml.odin +++ b/tests/core/encoding/xml/test_core_xml.odin @@ -142,7 +142,7 @@ xml_test_entities_unbox_decode :: proc(t: ^testing.T) { }, expected_doctype = "html", }, - crc32 = 0x3c0973e2, + crc32 = 0x6e45a697, }) } |