From e4e0dcf0d6e77e451cedb0ded65aefa1d5b6f54d Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Mon, 5 Dec 2016 10:47:22 -0500 Subject: [PATCH] lib/core: more tests for percent_encoding Signed-off-by: Alexandre Terrasa --- lib/core/bytes.nit | 1 + lib/core/text/abstract_text.nit | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/core/bytes.nit b/lib/core/bytes.nit index d250760..9e7064a 100644 --- a/lib/core/bytes.nit +++ b/lib/core/bytes.nit @@ -581,6 +581,7 @@ class Bytes # assert "incomplete %".to_bytes.from_percent_encoding == "incomplete %".to_bytes # assert "invalid % usage".to_bytes.from_percent_encoding == "invalid % usage".to_bytes # assert "%c3%a9%e3%81%82%e3%81%84%e3%81%86".to_bytes.from_percent_encoding == "éあいう".to_bytes + # assert "%1 %A %C3%A9A9".to_bytes.from_percent_encoding == "%1 %A éA9".to_bytes fun from_percent_encoding: Bytes do var tmp = new Bytes.with_capacity(length) var pos = 0 diff --git a/lib/core/text/abstract_text.nit b/lib/core/text/abstract_text.nit index 12eddfb..50f0aff 100644 --- a/lib/core/text/abstract_text.nit +++ b/lib/core/text/abstract_text.nit @@ -852,6 +852,7 @@ abstract class Text # assert "incomplete %".from_percent_encoding == "incomplete %" # assert "invalid % usage".from_percent_encoding == "invalid % usage" # assert "%c3%a9%e3%81%82%e3%81%84%e3%81%86".from_percent_encoding == "éあいう" + # assert "%1 %A %C3%A9A9".from_percent_encoding == "%1 %A éA9" fun from_percent_encoding: String do var len = byte_length -- 1.7.9.5