Skip to content

Commit 5380b2c

Browse files
Copilotstephentoub
andcommitted
Remove Windows-only skip from CRLF read acceptance tests
TextReader.ReadLineAsync handles \r\n on all platforms, so there's no reason to restrict these tests to Windows. Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 9530eeb commit 5380b2c

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

tests/ModelContextProtocol.Tests/Transport/StdioClientTransportTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace ModelContextProtocol.Tests.Transport;
1111
public class StdioClientTransportTests(ITestOutputHelper testOutputHelper) : LoggedTest(testOutputHelper)
1212
{
1313
public static bool IsStdErrCallbackSupported => !PlatformDetection.IsMonoRuntime;
14-
public static bool IsWindows => PlatformDetection.IsWindows;
1514

1615
[Fact]
1716
public async Task CreateAsync_ValidProcessInvalidServer_Throws()
@@ -166,7 +165,7 @@ public async Task SendMessageAsync_Should_Use_LF_Not_CRLF()
166165
Assert.Equal(expected, json);
167166
}
168167

169-
[Fact(Skip = "Non-Windows platform", SkipUnless = nameof(IsWindows))]
168+
[Fact]
170169
public async Task ReadMessagesAsync_Should_Accept_CRLF_Delimited_Messages()
171170
{
172171
Pipe serverInputPipe = new();

tests/ModelContextProtocol.Tests/Transport/StdioServerTransportTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ namespace ModelContextProtocol.Tests.Transport;
1111

1212
public class StdioServerTransportTests : LoggedTest
1313
{
14-
public static bool IsWindows => PlatformDetection.IsWindows;
15-
1614
private readonly McpServerOptions _serverOptions;
1715

1816
public StdioServerTransportTests(ITestOutputHelper testOutputHelper)
@@ -251,7 +249,7 @@ public async Task SendMessageAsync_Should_Use_LF_Not_CRLF()
251249
Assert.NotEqual((byte)'\r', bytes[^2]);
252250
}
253251

254-
[Fact(Skip = "Non-Windows platform", SkipUnless = nameof(IsWindows))]
252+
[Fact]
255253
public async Task ReadMessagesAsync_Should_Accept_CRLF_Delimited_Messages()
256254
{
257255
var message = new JsonRpcRequest { Method = "test", Id = new RequestId(44) };

0 commit comments

Comments
 (0)