Skip to content

Commit 5e8e7a2

Browse files
authored
Merge pull request #166 from filzrev/fix-failed-test-issue-when-disable-autocrlf
fix: Tests failed when line-end characters differ from OS default
2 parents 077ca44 + 2a82c0a commit 5e8e7a2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ConsoleAppFramework/ConsoleAppBaseCode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static class ConsoleAppBaseCode
88
#pragma warning disable
99
1010
namespace ConsoleAppFramework;
11-
11+
1212
using System;
1313
using System.Text;
1414
using System.Reflection;
@@ -307,7 +307,7 @@ static bool TryShowHelpOrVersion(ReadOnlySpan<string> args, int requiredParamete
307307
if (args.Length == 0)
308308
{
309309
if (requiredParameterCount == 0) return false;
310-
310+
311311
ShowHelp(helpId);
312312
return true;
313313
}
@@ -531,7 +531,7 @@ static bool TryShowHelpOrVersion(ReadOnlySpan<string> args, int requiredParamete
531531
if (args.Length == 0)
532532
{
533533
if (requiredParameterCount == 0) return false;
534-
534+
535535
ShowHelp(helpId);
536536
return true;
537537
}

tests/ConsoleAppFramework.GeneratorTests/CSharpGeneratorRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void Execute([StringSyntax("C#-test")] string code, string args, string e
196196
}
197197
OutputGeneratedCode(compilation);
198198

199-
stdout.ShouldBe(expected);
199+
stdout.ShouldBe(expected, StringCompareShould.IgnoreLineEndings);
200200
}
201201

202202
public string Error([StringSyntax("C#-test")] string code, string args, [CallerArgumentExpression("code")] string? codeExpr = null)

0 commit comments

Comments
 (0)