file_test.go 319 B

12345678910111213141516171819
  1. package utils
  2. import (
  3. "github.com/astaxie/beego/logs"
  4. "testing"
  5. )
  6. func TestZipDir(t *testing.T) {
  7. src := "../data/files/fcKFrcJamnjUTCI"
  8. dst := "../data/files/fcKFrcJamnjUTCI.tar.xz"
  9. err := TarXz(dst, src)
  10. if err != nil {
  11. logs.Error("zip fail", err)
  12. } else {
  13. logs.Info("zip ok")
  14. }
  15. }