From a1cb87c1c4369d057943118a884fced687db1f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tesa=C5=99?= Date: Thu, 6 Aug 2026 07:14:50 +0200 Subject: [PATCH] Add decode roundtrip test --- tests/core/net/test_core_net.odin | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/core/net/test_core_net.odin b/tests/core/net/test_core_net.odin index f360f95cd..b0cf57cad 100644 --- a/tests/core/net/test_core_net.odin +++ b/tests/core/net/test_core_net.odin @@ -547,6 +547,11 @@ percent_encode_test :: proc(t: ^testing.T) { encoded := net.percent_encode(test.input) defer delete(encoded) testing.expectf(t, encoded == test.expected, "Expected `net.percent_encode(%q)` to return %q, got %q", test.input, test.expected, encoded) + + decoded, ok := net.percent_decode(encoded) + defer delete(decoded) + testing.expectf(t, ok, "Expected `net.percent_decode(%q)` to succeed", encoded) + testing.expectf(t, decoded == test.input, "Expected percent-encoding roundtrip for %q, got %q", test.input, decoded) } }