Fix testing under Linux

This commit is contained in:
Lars Vahlenberg
2024-01-05 00:35:24 +01:00
parent 6c157def4b
commit 46d4b26eba
2 changed files with 13 additions and 0 deletions

View File

@@ -264,6 +264,12 @@ public class ArchiveTests : ReaderTests
ReaderOptions? readerOptions = null
)
{
#if !NETFRAMEWORK
if (!OperatingSystem.IsWindows())
{
fileOrder = fileOrder.Replace('\\', '/');
}
#endif
var expected = new Stack<string>(fileOrder.Split(' '));
testArchive = Path.Combine(TEST_ARCHIVES_PATH, testArchive);
using (var archive = ArchiveFactory.Open(testArchive, readerOptions))

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using SharpCompress.Common;
@@ -76,6 +77,12 @@ public abstract class ReaderTests : TestBase
ReaderOptions? options = null
)
{
#if !NETFRAMEWORK
if (!OperatingSystem.IsWindows())
{
fileOrder = fileOrder.Replace('\\', '/');
}
#endif
var expected = new Stack<string>(fileOrder.Split(' '));
testArchive = Path.Combine(TEST_ARCHIVES_PATH, testArchive);