acdream/tests/AcDream.Runtime.Tests/Chat/RetailPublicChatParserTests.cs
Erik f6fe0f2a4f
All checks were successful
CI / linux-portable (push) Successful in 3m27s
CI / windows-gate (push) Successful in 6m42s
CI / release (push) Successful in 2m12s
fix(client): restore retail interaction parity
Harden keyboard and camera routing, inventory and vendor interactions, chat/emotes, relog portal flow, and paperdoll rendering. Add retail research, connected gate coverage, and release-gate validation.
2026-08-26 20:45:11 +02:00

35 lines
1,021 B
C#

using AcDream.Runtime.Chat;
namespace AcDream.Runtime.Tests.Chat;
public sealed class RetailPublicChatParserTests
{
[Fact]
public void InvalidAndUnmatchedTokensRemainLiteral()
{
string text = RetailPublicChatParser.ExtractPoses(
"*unknown* and *unfinished",
_ => null,
_ => throw new Xunit.Sdk.XunitException("must not execute"));
Assert.Equal("*unknown* and *unfinished", text);
}
[Fact]
public void MultipleValidStarAndAngleTokensAreRemovedInOrder()
{
var motions = new List<uint>();
string text = RetailPublicChatParser.ExtractPoses(
"a *one* b <two> c",
command => command switch
{
"one" => new RetailChatPose(1u, "", ""),
"two" => new RetailChatPose(2u, "", ""),
_ => null,
},
pose => motions.Add(pose.MotionCommand));
Assert.Equal("a b c", text);
Assert.Equal([1u, 2u], motions);
}
}