From d8293b33b4c4a2f06c9e5d0833db291bbff02968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Mon, 28 Oct 2024 01:44:31 +0800 Subject: [PATCH] fix: test --- pkg/io/io_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pkg/io/io_test.go b/pkg/io/io_test.go index 4d85fb9ea7..2a61fe4322 100644 --- a/pkg/io/io_test.go +++ b/pkg/io/io_test.go @@ -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() { @@ -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)