lib/core: more tests for percent_encoding
authorAlexandre Terrasa <alexandre@moz-code.org>
Mon, 5 Dec 2016 15:47:22 +0000 (10:47 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 6 Dec 2016 18:37:55 +0000 (13:37 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/core/bytes.nit
lib/core/text/abstract_text.nit

index d250760..9e7064a 100644 (file)
@@ -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
index 12eddfb..50f0aff 100644 (file)
@@ -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