From 1feaf878cba6c31f637415cd425960a77c6f1449 Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Thu, 28 Dec 2017 17:06:02 +0000 Subject: [PATCH] make test data more tolerant to different environments --- .../Integration/SinglePageSimpleTests.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/UglyToad.Pdf.Tests/Integration/SinglePageSimpleTests.cs b/src/UglyToad.Pdf.Tests/Integration/SinglePageSimpleTests.cs index 70ea2064..de7d2c9f 100644 --- a/src/UglyToad.Pdf.Tests/Integration/SinglePageSimpleTests.cs +++ b/src/UglyToad.Pdf.Tests/Integration/SinglePageSimpleTests.cs @@ -178,9 +178,7 @@ namespace UglyToad.Pdf.Tests.Integration } } } - - - + private static IReadOnlyList GetPdfBoxPositionData() { // X Y Width Letter FontSize Font @@ -283,7 +281,7 @@ namespace UglyToad.Pdf.Tests.Integration 206.445 173.25 3.054764 t 14 ArialMT 209.499 173.25 3.054764 . 14 ArialMT"; - return fromPdfBox.Split("\r\n", StringSplitOptions.RemoveEmptyEntries) + return fromPdfBox.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries) .Select(AssertablePositionData.Parse) .ToList(); } @@ -409,7 +407,7 @@ namespace UglyToad.Pdf.Tests.Integration 209.499 173.25 3.045609 . 0 ArialMT 212.543 173.25 3.045609 0 ArialMT"; - return fromOther.Split("\r\n", StringSplitOptions.RemoveEmptyEntries) + return fromOther.Split(new[]{"\r\n", "\r", "\n"}, StringSplitOptions.RemoveEmptyEntries) .Select(AssertablePositionData.Parse) .ToList(); }