From 4c9ccd6ae1a4a92abbcc888285add45f25d23e77 Mon Sep 17 00:00:00 2001 From: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com> Date: Sun, 18 Jul 2021 23:36:18 +0300 Subject: [PATCH] TESTS: Add URL normalisation xfail test --- tests/test_port/fixtures/normalize.md | 8 ++++++++ tests/test_port/test_fixtures.py | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_port/fixtures/normalize.md b/tests/test_port/fixtures/normalize.md index 0020e16d..4a005089 100644 --- a/tests/test_port/fixtures/normalize.md +++ b/tests/test_port/fixtures/normalize.md @@ -29,3 +29,11 @@ Don't encode domains in unknown schemas: .

. + + +Square brackets are allowed +. +[foo](https://bar]baz.org) +. +

foo

+. diff --git a/tests/test_port/test_fixtures.py b/tests/test_port/test_fixtures.py index 60d2c02f..db48a87d 100644 --- a/tests/test_port/test_fixtures.py +++ b/tests/test_port/test_fixtures.py @@ -81,7 +81,10 @@ def test_commonmark_extras(line, title, input, expected): read_fixture_file(FIXTURE_PATH.joinpath("normalize.md")), ) def test_normalize_url(line, title, input, expected): - if "Keep %25" in title: + if title in { + "Keep %25 as is because decoding it may break urls, #720", + "Square brackets are allowed", + }: # TODO fix failing url escaping test pytest.xfail("url normalisation") md = MarkdownIt("commonmark")