From 217b3229b699ef9524e4ef8856584d4a86a9d463 Mon Sep 17 00:00:00 2001 From: Taskscape Ltd Date: Tue, 25 Aug 2026 13:00:02 +0200 Subject: [PATCH] tests: normalize multiline FTP source contracts Make the FTP certificate regression contract independent of CRLF versus LF checkout state by normalizing datacon1.cpp before multiline assertions. This keeps the Build Installer NativeSafety gate focused on the required source structure instead of platform-specific line endings. --- tests/FileManager.UiTests/NativeSafetyRegressionTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/FileManager.UiTests/NativeSafetyRegressionTests.cs b/tests/FileManager.UiTests/NativeSafetyRegressionTests.cs index fa3623d..5e023ca 100644 --- a/tests/FileManager.UiTests/NativeSafetyRegressionTests.cs +++ b/tests/FileManager.UiTests/NativeSafetyRegressionTests.cs @@ -2676,7 +2676,10 @@ public void Ftp_certificate_exceptions_are_endpoint_bound_expiring_and_pinned() var tlsHeader = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "ssl.h")); var tls = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "ssl.cpp")); var sockets = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "sockets.cpp")); - var dataConnection = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "datacon1.cpp")); + // Normalize checkout line endings to LF so multiline source contracts verify code structure rather than Git autocrlf state. + var dataConnection = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "datacon1.cpp")) + .Replace("\r\n", "\n", StringComparison.Ordinal) + .Replace("\r", "\n", StringComparison.Ordinal); var control = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "ctrlcon1.cpp")); var operationDialog = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "dialogs5.cpp")); var configuration = File.ReadAllText(Path.Combine(root, "src", "plugins", "ftp", "ftp.cpp"));