Skip to content

Commit

Permalink
fix the expected/actual value ordering in a few unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Numpsy committed May 8, 2021
1 parent 34879be commit e723cce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/ICSharpCode.SharpZipLib.Tests/Zip/FastZipHandling.cs
Expand Up @@ -268,7 +268,7 @@ private void TestFileNames(IEnumerable<string> names)
{
var index = z.FindEntry(name, true);

Assert.AreNotEqual(index, -1, "Zip entry \"{0}\" not found", name);
Assert.AreNotEqual(-1, index, "Zip entry \"{0}\" not found", name);

var entry = z[index];

Expand Down
Expand Up @@ -102,15 +102,15 @@ public void NameTransforms_Posix()
[Category("Zip")]
public void FilenameCleaning()
{
Assert.AreEqual(ZipEntry.CleanName("hello"), "hello");
Assert.AreEqual("hello", ZipEntry.CleanName("hello"));
if(Environment.OSVersion.Platform == PlatformID.Win32NT)
{
Assert.AreEqual(ZipEntry.CleanName(@"z:\eccles"), "eccles");
Assert.AreEqual(ZipEntry.CleanName(@"\\server\share\eccles"), "eccles");
Assert.AreEqual(ZipEntry.CleanName(@"\\server\share\dir\eccles"), "dir/eccles");
Assert.AreEqual("eccles", ZipEntry.CleanName(@"z:\eccles"));
Assert.AreEqual("eccles", ZipEntry.CleanName(@"\\server\share\eccles"));
Assert.AreEqual("dir/eccles", ZipEntry.CleanName(@"\\server\share\dir\eccles"));
}
else {
Assert.AreEqual(ZipEntry.CleanName(@"/eccles"), "eccles");
Assert.AreEqual("eccles", ZipEntry.CleanName(@"/eccles"));
}
}

Expand Down

0 comments on commit e723cce

Please sign in to comment.