unarchiveFile_test.go 588 B

1234567891011121314151617181920212223242526272829
  1. package archive_helper
  2. import (
  3. "testing"
  4. )
  5. func TestUnArchiveFile(t *testing.T) {
  6. desRoot := "C:\\Tmp"
  7. //file := "C:\\Tmp\\123.zip"
  8. //file := "C:\\Tmp\\456.rar"
  9. file := "C:\\Tmp\\789.tar"
  10. err := UnArchiveFile(file, desRoot)
  11. if err != nil {
  12. t.Fatal(err)
  13. }
  14. }
  15. func TestUnArr(t *testing.T) {
  16. desRoot := "C:\\Tmp"
  17. //file := "C:\\Tmp\\[subhd]_0_162236051219240.zip"
  18. file := "C:\\Tmp\\123.zip"
  19. //file := "C:\\Tmp\\Tmp.7z"
  20. //file := "C:\\Tmp\\[zimuku]_0_[zmk.pw]奥斯陆.Oslo.[WEB.1080P]中英文字幕.zip"
  21. err := unArr7z(file, desRoot)
  22. if err != nil {
  23. t.Fatal(err)
  24. }
  25. }