Browse Source

Use fixed culture en-US in SerializableExceptionTests (#9132)

pull/9136/head
Michael Seibt 4 years ago
committed by GitHub
parent
commit
a2cb7cf90b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      UnitTests/BugReporter.Tests/SerializableExceptionTests.cs

12
UnitTests/BugReporter.Tests/SerializableExceptionTests.cs

@ -12,6 +12,8 @@ using NUnit.Framework;
namespace BugReporterTests
{
[TestFixture]
[SetCulture("en-US")]
[SetUICulture("en-US")]
public sealed class SerializableExceptionTests
{
[MethodImpl(MethodImplOptions.NoInlining)]
@ -72,15 +74,7 @@ namespace BugReporterTests
StringBuilder m = new();
foreach (string line in exceptionMessage.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries))
{
Match match = Regex.Match(line, @".*(?<path>\sin\s.*)");
if (match.Success)
{
m.AppendLine(line.Replace(match.Groups["path"].Value, string.Empty));
}
else
{
m.AppendLine(line);
}
m.AppendLine(Regex.Replace(line, @"^(?<keep>.*)(?<codeLocationToBeRemoved>\sin\s.*)$", "${keep}"));
}
return m.ToString();

Loading…
Cancel
Save