Skip to content

Commit

Permalink
test: fix line ending problem
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Jan 9, 2025
1 parent c96f84d commit cbaa031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lip.Tests/PackageManifestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,6 @@ public void ToBytes_MinimumJson_Passes()
"tooth": "",
"version": "1.0.0"
}
""", json);
""".ReplaceLineEndings(), json.ReplaceLineEndings());
}
}
6 changes: 2 additions & 4 deletions Lip.Tests/RuntimeConfigurationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void ToBytes_MinimumJson_Passes()
{
var runtimeConfiguration = new RuntimeConfiguration();

string expected = $$"""
Assert.Equal($$"""
{
"cache": "{{(OperatingSystem.IsWindows() ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "lip-cache").Replace("\\", "\\\\") : Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "lip"))}}",
"color": true,
Expand All @@ -82,8 +82,6 @@ public void ToBytes_MinimumJson_Passes()
"proxy": "",
"script_shell": "{{(OperatingSystem.IsWindows() ? "cmd.exe" : "/bin/sh")}}"
}
""";

Assert.Equal(expected, Encoding.UTF8.GetString(runtimeConfiguration.ToBytes()));
""".ReplaceLineEndings(), Encoding.UTF8.GetString(runtimeConfiguration.ToBytes()).ReplaceLineEndings());
}
}

0 comments on commit cbaa031

Please sign in to comment.