From 800305bc8d33d38b5fb280af12564a939457d410 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Sat, 19 Aug 2017 13:35:42 +0100 Subject: [PATCH] attempt to fix path issues on travis --- tests/ImageSharp.Tests/TestFile.cs | 2 +- tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ImageSharp.Tests/TestFile.cs b/tests/ImageSharp.Tests/TestFile.cs index 71ab16ccf6..d3c40f86aa 100644 --- a/tests/ImageSharp.Tests/TestFile.cs +++ b/tests/ImageSharp.Tests/TestFile.cs @@ -92,7 +92,7 @@ namespace SixLabors.ImageSharp.Tests /// public static string GetInputFileFullPath(string file) { - return Path.Combine(InputImagesDirectory, file); + return Path.Combine(InputImagesDirectory, file).Replace('\\', Path.DirectorySeparatorChar); } /// diff --git a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs index f72e2d3a46..1f8930f84b 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs @@ -91,24 +91,24 @@ namespace SixLabors.ImageSharp.Tests /// Gets the correct full path to the Input Images directory. /// internal static string InputImagesDirectoryFullPath => - Path.Combine(SolutionDirectoryFullPath, InputImagesRelativePath); + Path.Combine(SolutionDirectoryFullPath, InputImagesRelativePath).Replace('\\', Path.DirectorySeparatorChar); /// /// Gets the correct full path to the Actual Output directory. (To be written to by the test cases.) /// internal static string ActualOutputDirectoryFullPath => Path.Combine( SolutionDirectoryFullPath, - ActualOutputDirectoryRelativePath); + ActualOutputDirectoryRelativePath).Replace('\\', Path.DirectorySeparatorChar); /// /// Gets the correct full path to the Expected Output directory. (To compare the test results to.) /// internal static string ReferenceOutputDirectoryFullPath => Path.Combine( SolutionDirectoryFullPath, - ReferenceOutputDirectoryRelativePath); + ReferenceOutputDirectoryRelativePath).Replace('\\', Path.DirectorySeparatorChar); internal static string GetReferenceOutputFileName(string actualOutputFileName) => - actualOutputFileName.Replace("ActualOutput", @"External\ReferenceOutput"); + actualOutputFileName.Replace("ActualOutput", @"External\ReferenceOutput").Replace('\\', Path.DirectorySeparatorChar); internal static IImageDecoder GetReferenceDecoder(string filePath) {