Skip to content

Commit

Permalink
Windows slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Apr 4, 2017
1 parent 041874c commit 5e858b5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions decompress_tbz2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ package getter

import (
"path/filepath"
"runtime"
"testing"
)

func TestTarBzip2Decompressor(t *testing.T) {
orderingPaths := []string{"workers/", "workers/mq/", "workers/mq/__init__.py"}
if runtime.GOOS == "windows" {
orderingPaths = []string{"workers/", "workers\\mq/", "workers\\mq\\__init__.py"}
}

cases := []TestDecompressCase{
{
Expand Down
2 changes: 1 addition & 1 deletion decompress_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func testListDir(t *testing.T, path string) []string {

// If it is a dir, add trailing sep
if info.IsDir() {
sub += "/"
sub += string(os.PathSeparator)
}

result = append(result, sub)
Expand Down
5 changes: 0 additions & 5 deletions decompress_tgz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ package getter

import (
"path/filepath"
"runtime"
"testing"
)

func TestTarGzipDecompressor(t *testing.T) {

multiplePaths := []string{"dir/", "dir/test2", "test1"}
orderingPaths := []string{"workers/", "workers/mq/", "workers/mq/__init__.py"}
if runtime.GOOS == "windows" {
multiplePaths = []string{"dir/", "dir\\test2", "test1"}
orderingPaths = []string{"workers/", "workers\\mq/", "workers\\mq\\__init__.py"}
}

cases := []TestDecompressCase{
{
Expand Down

0 comments on commit 5e858b5

Please sign in to comment.