From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- intl/uconv/tests/unit/test_unEscapeURIForUI.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 intl/uconv/tests/unit/test_unEscapeURIForUI.js (limited to 'intl/uconv/tests/unit/test_unEscapeURIForUI.js') diff --git a/intl/uconv/tests/unit/test_unEscapeURIForUI.js b/intl/uconv/tests/unit/test_unEscapeURIForUI.js new file mode 100644 index 0000000000..7f2fb167cc --- /dev/null +++ b/intl/uconv/tests/unit/test_unEscapeURIForUI.js @@ -0,0 +1,23 @@ +// Tests for nsITextToSubURI.unEscapeURIForUI +function run_test() { + // Tests whether incomplete multibyte sequences throw. + const tests = [ + { + input: "http://example.com/?p=%E3%80%82", + //TODO: should be the same as input, bug 1248812 + expected: "http://example.com/?p=%u3002", + }, + { + input: "http://example.com/?name=%E3%80%82", + dontEscape: true, + expected: "http://example.com/?name=\u3002", + }, + ]; + + for (const t of tests) { + Assert.equal( + Services.textToSubURI.unEscapeURIForUI(t.input, t.dontEscape), + t.expected + ); + } +} -- cgit v1.2.3