From 76991c039f1dbf509e9b197e658ac264351cf493 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Sun, 25 Oct 2020 20:22:30 +0900 Subject: [PATCH] test: add upstream test cases to urlsearchparam Refs: https://github.com/web-platform-tests/wpt/pull/26126 PR-URL: https://github.com/nodejs/node/pull/35792 Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/fixtures/wpt/README.md | 2 +- test/fixtures/wpt/url/urlsearchparams-constructor.any.js | 2 ++ test/fixtures/wpt/versions.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 1ae38fa52d8e90..dc1a5615610341 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -12,7 +12,7 @@ Last update: - console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console - encoding: https://github.com/web-platform-tests/wpt/tree/d7f9e16c9a/encoding -- url: https://github.com/web-platform-tests/wpt/tree/33e4ac0902/url +- url: https://github.com/web-platform-tests/wpt/tree/54c6d64be0/url - resources: https://github.com/web-platform-tests/wpt/tree/1d14e821b9/resources - interfaces: https://github.com/web-platform-tests/wpt/tree/15e47f779c/interfaces - html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing diff --git a/test/fixtures/wpt/url/urlsearchparams-constructor.any.js b/test/fixtures/wpt/url/urlsearchparams-constructor.any.js index 1135d5d3dbbfa3..f9878373e5e067 100644 --- a/test/fixtures/wpt/url/urlsearchparams-constructor.any.js +++ b/test/fixtures/wpt/url/urlsearchparams-constructor.any.js @@ -200,6 +200,8 @@ test(function() { { "input": {"+": "%C2"}, "output": [["+", "%C2"]], "name": "object with +" }, { "input": {c: "x", a: "?"}, "output": [["c", "x"], ["a", "?"]], "name": "object with two keys" }, { "input": [["c", "x"], ["a", "?"]], "output": [["c", "x"], ["a", "?"]], "name": "array with two keys" }, + { "input": {"\uD835x": "1", "xx": "2", "\uD83Dx": "3"}, "output": [["\uFFFDx", "3"], ["xx", "2"]], "name": "2 unpaired surrogates (no trailing)" }, + { "input": {"x\uDC53": "1", "x\uDC5C": "2", "x\uDC65": "3"}, "output": [["x\uFFFD", "3"]], "name": "3 unpaired surrogates (no leading)" }, { "input": {"a\0b": "42", "c\uD83D": "23", "d\u1234": "foo"}, "output": [["a\0b", "42"], ["c\uFFFD", "23"], ["d\u1234", "foo"]], "name": "object with NULL, non-ASCII, and surrogate keys" } ].forEach((val) => { test(() => { diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 74d7d39a10360a..77e19285d94759 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -8,7 +8,7 @@ "path": "encoding" }, "url": { - "commit": "33e4ac09029c463ea6ee57d6f33477a9043e98e8", + "commit": "54c6d64be071c60baaad8c4da0365b962ffbe77c", "path": "url" }, "resources": {