From: Alexandre Terrasa Date: Mon, 5 Dec 2016 15:47:22 +0000 (-0500) Subject: lib/core: more tests for percent_encoding X-Git-Url: http://nitlanguage.org lib/core: more tests for percent_encoding Signed-off-by: Alexandre Terrasa --- 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