aboutsummaryrefslogtreecommitdiff
path: root/tests/core/encoding
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2026-01-22 11:47:23 +0100
committerGitHub <noreply@github.com>2026-01-22 11:47:23 +0100
commit3f8a32aeb963e056ac7709c26f05a99fb884ef95 (patch)
tree4eed35fa23e9f4c5b7dedc6a355b16f5d3119661 /tests/core/encoding
parentfb479b3aaec5a9a715bcff7d65498ba18020f4f0 (diff)
parent5c09550d383df49a1d29d8f66bc1c45ee3be1136 (diff)
Merge branch 'master' into xmlcomment
Diffstat (limited to 'tests/core/encoding')
-rw-r--r--tests/core/encoding/base64/base64.odin17
-rw-r--r--tests/core/encoding/xml/test_core_xml.odin2
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,
})
}