Skip to content

Commit 3a6f6be

Browse files
committed
Fix NLog trace context test regex for macOS locale
macOS uses narrow no-break space (U+202F) between time and AM/PM, not regular ASCII space. Use \s* to match any Unicode whitespace.
1 parent 7f4dd8d commit 3a6f6be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/IntegrationTests/NLogBridgeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void TraceContext_IsInjectedIntoCurrentNLogLogsDestination(string package
147147
Arguments = "--api nlog"
148148
});
149149

150-
var regex = new Regex(@"INFO TestApplication\.NLogBridge\.Program - Hello, world at \d{1,2}\:\d{2}( [AP]M)?\! TraceId=[a-f0-9]{32} SpanId=[a-f0-9]{16} TraceFlags=0[01]");
150+
var regex = new Regex(@"INFO TestApplication\.NLogBridge\.Program - Hello, world at \d{1,2}\:\d{2}(\s*[AP]M)?\! TraceId=[a-f0-9]{32} SpanId=[a-f0-9]{16} TraceFlags=0[01]");
151151
var output = standardOutput;
152152
Assert.Matches(regex, output);
153153
Assert.Contains("ERROR TestApplication.NLogBridge.Program - Exception occured", output);

0 commit comments

Comments
 (0)