[whatwg/url] IdnaTestV2.json "xn--xn--a--gua.pt" test case problem (Issue #803)

### What is the issue with the URL Standard?

When updating [jsdom/tr46](https://github.com/jsdom/tr46) to the latest revision of [TR46](https://unicode.org/reports/tr46), I implemented this new line of the [label validity criteria](https://unicode.org/reports/tr46/#Validity_Criteria):

> If not CheckHyphens, the label must not begin with “xn--”.

This causes my test suite to fail due to [these lines from IdnaTestV2.json](https://github.com/web-platform-tests/wpt/blob/72b915d4b3754f081ef5899bf6a777efe71b2fc5/url/resources/IdnaTestV2.json#L612C1-L615C5):

```json
  {
    "comment": "V2 (ignored)",
    "input": "xn--xn--a--gua.pt",
    "output": "xn--xn--a--gua.pt"
  },
```

which correspond to these lines from [`IdnaTestV2.txt`](https://unicode.org/Public/idna/15.0.0/IdnaTestV2.txt):

```
xn--xn--a--gua.pt; xn--a-ä.pt; [V2]; xn--xn--a--gua.pt; ; ;  # xn--a-ä.pt
```

I can't tell whether this is a problem with the source data, or with [our conversion script](https://github.com/web-platform-tests/wpt/blob/master/url/tools/IdnaTestV2-parser.py). The conversion script seems to be trying to do something with the V2 error codes, but I'm not sure exactly what.

Note that other V2 error codes in the test data don't seem to cause problems.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/803
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/803@github.com>

Received on Sunday, 5 November 2023 04:05:42 UTC