Skip to content

Commit 870d309

Browse files
authored
Normalize line endings in test (#273)
+semver:patch
1 parent b47034a commit 870d309

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/DelegateDecompiler.Tests/OutParametersTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void TestOutParameter()
1515
var expression = (Expression<Func<string, int>>)MethodBodyDecompiler.Decompile(mi);
1616

1717
Assert.That(expression.ToString(), Is.EqualTo("s => {var Param_0; ... }"));
18-
Assert.That(DebugView(expression), Is.EqualTo(@".Lambda #Lambda1<System.Func`2[System.String,System.Int32]>(System.String $s) {
18+
Assert.That(DebugView(expression).NormalizeLineEndings(), Is.EqualTo(@".Lambda #Lambda1<System.Func`2[System.String,System.Int32]>(System.String $s) {
1919
.Block(System.Int32 $var1) {
2020
.If (
2121
.Call System.Int32.TryParse(
@@ -27,7 +27,7 @@ .Call System.Int32.TryParse(
2727
-1
2828
}
2929
}
30-
}"));
30+
}".NormalizeLineEndings()));
3131

3232
var compiledMethod = expression.Compile();
3333

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace DelegateDecompiler.Tests;
2+
3+
internal static class StringExtensions
4+
{
5+
public static string NormalizeLineEndings(this string s) => s.Replace("\r\n", "\n");
6+
}

0 commit comments

Comments
 (0)