File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
test/ICSharpCode.SharpZipLib.Tests/Tar Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -899,14 +899,19 @@ public void StreamWithJapaneseName(int length, string encodingName)
899899 File . WriteAllBytes ( Path . Combine ( Path . GetTempPath ( ) , $ "jpnametest_{ length } _{ encodingName } .tar") , memoryStream . ToArray ( ) ) ;
900900 }
901901 }
902+ /// <summary>
903+ /// This test could be considered integration test. it creates a tar archive with the root directory specified
904+ /// Then extracts it and compares the two folders. This used to fail on unix due to issues with root folder handling
905+ /// in the tar archive.
906+ /// </summary>
902907 [ Test ]
903908 [ Category ( "Tar" ) ]
904909 public void rootPathIsRespected ( )
905910 {
906911 // create dummy folder structure
907912 var tempDirectory = Path . Combine ( Path . GetTempPath ( ) , "sharpziplib_tar_test_folder" ) ;
908913 CreateAndClearDirectory ( tempDirectory ) ;
909- using ( var dummyfile = File . Create ( "dummyfile" ) )
914+ using ( var dummyfile = File . Create ( Path . Combine ( tempDirectory , "dummyfile" ) ) )
910915 {
911916 using ( var randomStream = new ChaosStream ( ) )
912917 {
@@ -956,7 +961,7 @@ private void CreateAndClearDirectory(string path)
956961
957962 public class ChaosStream : MemoryStream
958963 {
959- private readonly int length = new Random ( ) . Next ( ) % 5000 + 200 ;
964+ private readonly int length = new Random ( ) . Next ( ) % 500000 + 200 ;
960965
961966 // Create constructors as needed to match desired MemoryStream construction
962967
You can’t perform that action at this time.
0 commit comments