Add tests for TextFormatter StripCRLF and ReplaceCRLFWithSpace

Also made the helper methods internal so they can be accessed from the test project.
This commit is contained in:
Tonttu
2025-03-14 21:29:56 +02:00
committed by Tig
parent 384cefcdf1
commit c4502b0741
2 changed files with 75 additions and 2 deletions

View File

@@ -1185,7 +1185,7 @@ public class TextFormatter
}
// TODO: Move to StringExtensions?
private static string StripCRLF (string str, bool keepNewLine = false)
internal static string StripCRLF (string str, bool keepNewLine = false)
{
List<Rune> runes = str.ToRuneList ();
@@ -1229,7 +1229,7 @@ public class TextFormatter
}
// TODO: Move to StringExtensions?
private static string ReplaceCRLFWithSpace (string str)
internal static string ReplaceCRLFWithSpace (string str)
{
List<Rune> runes = str.ToRuneList ();