github.com/weiwenhao/getter@v1.30.1/decompress_bzip2_test.go (about)

     1  package getter
     2  
     3  import (
     4  	"path/filepath"
     5  	"testing"
     6  )
     7  
     8  func TestBzip2Decompressor(t *testing.T) {
     9  	cases := []TestDecompressCase{
    10  		{
    11  			"single.bz2",
    12  			false,
    13  			false,
    14  			nil,
    15  			"d3b07384d113edec49eaa6238ad5ff00",
    16  			nil,
    17  		},
    18  
    19  		{
    20  			"single.bz2",
    21  			true,
    22  			true,
    23  			nil,
    24  			"",
    25  			nil,
    26  		},
    27  	}
    28  
    29  	for i, tc := range cases {
    30  		cases[i].Input = filepath.Join("./testdata", "decompress-bz2", tc.Input)
    31  	}
    32  
    33  	TestDecompressor(t, new(Bzip2Decompressor), cases)
    34  }