[sdk/dotnet] Fix test by ensuring both sides of test strings trimmed
@@ -38,13 +38,14 @@ namespace Pulumi.Automation.Tests
Assert.Matches(@"^(warning: A new version of Pulumi[^\n]+\n)?",
result.StandardError);
- Assert.Equal(Lines(result.StandardOutput), stdoutLines);
- Assert.Equal(Lines(result.StandardError), stderrLines);
+ Assert.Equal(Lines(result.StandardOutput), stdoutLines.Select(x => x.Trim()));
+ Assert.Equal(Lines(result.StandardError), stderrLines.Select(x => x.Trim()));
}
private IEnumerable<string> Lines(string s) {
return s.Split(Environment.NewLine,
- StringSplitOptions.RemoveEmptyEntries);
+ StringSplitOptions.RemoveEmptyEntries)
+ .Select(x => x.Trim());
}
}
}
