Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 27, 2024
1 parent bb61749 commit d8293b3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pkg/io/io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ func (s *IOTestSuite) TestCompress() {
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.zip"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.gz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.bz2"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.gz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.tar"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.tar.gz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.xz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "compress_test.7z"))
s.NoError(err)
}

func (s *IOTestSuite) TestUnCompress() {
Expand All @@ -77,6 +91,20 @@ func (s *IOTestSuite) TestUnCompress() {
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.zip"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.gz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.bz2"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.gz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.tar"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.tar.gz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.xz"))
s.NoError(err)
err = Compress(abs, src, filepath.Join(abs, "uncompress_test.7z"))
s.NoError(err)

err = UnCompress(filepath.Join(abs, "uncompress_test.zip"), filepath.Join(abs, "uncompressed"))
s.NoError(err)
Expand Down

0 comments on commit d8293b3

Please sign in to comment.