Skip to content

Commit 09f94d8

Browse files
committed
Add a failing test ensuring url encoded tags decode properly
1 parent 6525bb8 commit 09f94d8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

YamlDotNet.Test/Core/ParserTests.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,28 @@ public void VerifyTokenWithMultiDocTag()
388388
StreamEnd);
389389
}
390390

391+
[Fact]
392+
public void VerifyTokenWithUrlEncodedTagContainingPlusSpaces()
393+
{
394+
AssertSequenceOfEventsFrom(Yaml.ParserForText("!(%20%20%20hello+you%20+) value"),
395+
StreamStart,
396+
DocumentStart(Implicit),
397+
PlainScalar("value").T("!( hello you )"),
398+
DocumentEnd(Implicit),
399+
StreamEnd);
400+
}
401+
402+
[Fact]
403+
public void VerifyTokenWithUrlEncoded32BitsUnicodeTags()
404+
{
405+
AssertSequenceOfEventsFrom(Yaml.ParserForText("!hel%F4%8F%BF%BFlo%E2%99%A5+A%20 value"),
406+
StreamStart,
407+
DocumentStart(Implicit),
408+
PlainScalar("value").T("!hel􏿿lo♥ A "),
409+
DocumentEnd(Implicit),
410+
StreamEnd);
411+
}
412+
391413
[Theory]
392414
[InlineData("|\n b-carriage-return,b-line-feed\r\n lll", "b-carriage-return,b-line-feed\nlll")]
393415
[InlineData("|\n b-carriage-return\r lll", "b-carriage-return\nlll")]

0 commit comments

Comments
 (0)