Skip to content

Commit

Permalink
Merge pull request #41 from paulloz/line-endings-in-tests
Browse files Browse the repository at this point in the history
Ignore EOL when comparing strings in tests
  • Loading branch information
jolexxa authored Nov 20, 2023
2 parents f7b0fa1 + aefa4e8 commit 73a4b02
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions GodotEnv.Tests/src/common/utilities/LogTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ public void OutputsCorrectStyleChanges() {
[/style][style fg="green"]F

[/style]
""".ReplaceLineEndings()
);
""", StringCompareShould.IgnoreLineEndings);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public async Task Executes() {


[/style]
""".ReplaceLineEndings()
);
""", StringCompareShould.IgnoreLineEndings);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Reportable event
System.InvalidOperationException: Test exception

[/style]
""");
""", StringCompareShould.IgnoreLineEndings);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Moq;
using Xunit;
using Shouldly;
using CliFx.Infrastructure;

using Common.Models;
using Common.Utilities;
using Features.Godot.Domain;
using Features.Addons.Commands;
using Features.Godot.Domain;
using Moq;
using Shouldly;
using Xunit;

public sealed class GodotListCommandTest : IDisposable {

Expand Down Expand Up @@ -51,7 +50,7 @@ Retrieving available Godot versions...
3.2.3
4.0.1

""");
""", StringCompareShould.IgnoreLineEndings);
}

[Fact]
Expand All @@ -67,6 +66,6 @@ public async Task FailsGracefullyOnHttpException() {
Retrieving available Godot versions...
Unable to reach remote Godot versions list.

""");
""", StringCompareShould.IgnoreLineEndings);
}
}

0 comments on commit 73a4b02

Please sign in to comment.