From 0db66d2aa3c5abe79e55017435894898a2ebe898 Mon Sep 17 00:00:00 2001 From: John Stark Date: Thu, 5 Jan 2023 20:40:13 +0100 Subject: Fix secondary tag encoding. See #449 The second exclamation mark was getting url encoded, when it should be preserved. Added a regression test. --- _test/test_issues.py | 6 ++++++ _test/test_tag.py | 9 +++++++++ 2 files changed, 15 insertions(+) (limited to '_test') diff --git a/_test/test_issues.py b/_test/test_issues.py index 736dccb..dce77e5 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -862,6 +862,12 @@ class TestIssues: """ d = na_round_trip(inp) # NOQA + def test_issue_449(self): + inp = """\ + emoji_index: !!python/name:materialx.emoji.twemoji + """ + d = na_round_trip(inp) # NOQA + # @pytest.mark.xfail(strict=True, reason='bla bla', raises=AssertionError) # def test_issue_ xxx(self): # inp = """ diff --git a/_test/test_tag.py b/_test/test_tag.py index 3fd1e05..ec086f3 100644 --- a/_test/test_tag.py +++ b/_test/test_tag.py @@ -64,6 +64,15 @@ class TestIndentFailures: language: python """) + def test_spec_6_26_tag_shorthands(self): + round_trip("""\ + %TAG !e! tag:example.com,2000:app/ + --- + - !local foo + - !!str bar + - !e!tag%21 baz + """) + class TestRoundTripCustom: def test_X1(self): -- cgit v1.2.1