File tree 1 file changed +7
-2
lines changed
test/ICSharpCode.SharpZipLib.Tests/Tar
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)
899
899
File . WriteAllBytes ( Path . Combine ( Path . GetTempPath ( ) , $ "jpnametest_{ length } _{ encodingName } .tar") , memoryStream . ToArray ( ) ) ;
900
900
}
901
901
}
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>
902
907
[ Test ]
903
908
[ Category ( "Tar" ) ]
904
909
public void rootPathIsRespected ( )
905
910
{
906
911
// create dummy folder structure
907
912
var tempDirectory = Path . Combine ( Path . GetTempPath ( ) , "sharpziplib_tar_test_folder" ) ;
908
913
CreateAndClearDirectory ( tempDirectory ) ;
909
- using ( var dummyfile = File . Create ( "dummyfile" ) )
914
+ using ( var dummyfile = File . Create ( Path . Combine ( tempDirectory , "dummyfile" ) ) )
910
915
{
911
916
using ( var randomStream = new ChaosStream ( ) )
912
917
{
@@ -956,7 +961,7 @@ private void CreateAndClearDirectory(string path)
956
961
957
962
public class ChaosStream : MemoryStream
958
963
{
959
- private readonly int length = new Random ( ) . Next ( ) % 5000 + 200 ;
964
+ private readonly int length = new Random ( ) . Next ( ) % 500000 + 200 ;
960
965
961
966
// Create constructors as needed to match desired MemoryStream construction
962
967
You can’t perform that action at this time.
0 commit comments