diff options
author | John Stark <jhnstrk@gmail.com> | 2023-01-05 20:40:13 +0100 |
---|---|---|
committer | John Stark <jhnstrk@gmail.com> | 2023-01-05 20:40:13 +0100 |
commit | 0db66d2aa3c5abe79e55017435894898a2ebe898 (patch) | |
tree | e33e6d7bb7eb448302b3299545657203caf371f0 /_test | |
parent | 45111ba0b67e8619265d89f3202635e62c13cde6 (diff) | |
download | ruamel.yaml-0db66d2aa3c5abe79e55017435894898a2ebe898.tar.gz |
Fix secondary tag encoding. See #449449_secondary_tag_url_enc
The second exclamation mark was getting url encoded, when it
should be preserved. Added a regression test.
Diffstat (limited to '_test')
-rw-r--r-- | _test/test_issues.py | 6 | ||||
-rw-r--r-- | _test/test_tag.py | 9 |
2 files changed, 15 insertions, 0 deletions
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): |