Skip to content

Commit

Permalink
tests: remove CRLF when testing to make them run independently of the OS
Browse files Browse the repository at this point in the history
  • Loading branch information
luantranminh committed Aug 17, 2024
1 parent 8003a73 commit b98a135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Atlas.Provider.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ static int Main(string[] args)
Console.SetOut(originalOut);
if (!string.IsNullOrEmpty(sql))
{
Console.Out.NewLine = "\n";
if (ctxInfo["ProviderName"]!.ToString()!.EndsWith("SqlServer"))
{
Console.WriteLine("-- atlas:delimiter GO");
Expand Down
5 changes: 4 additions & 1 deletion test/Atlas.Provider.Test/GenerateSchemaTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public void Can_generate_script(string providerName, string expectedFile)
string output = process.StandardOutput.ReadToEnd();
string error = process.StandardError.ReadToEnd();
process.WaitForExit();
Assert.Equal(FileReader.Read(expectedFile), output);
string expected = FileReader.Read(expectedFile);
// expectedFile is LF, defined in .gitattributes
// output is platform-specific, so normalize to LF
Assert.Equal(FileReader.Read(expectedFile), output.ReplaceLineEndings("\n"));
Assert.Equal("", error);
}
}
Expand Down

0 comments on commit b98a135

Please sign in to comment.