summaryrefslogtreecommitdiffstats
path: root/helpers/path_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/path_test.go')
-rw-r--r--helpers/path_test.go21
1 files changed, 8 insertions, 13 deletions
diff --git a/helpers/path_test.go b/helpers/path_test.go
index 50c23dccc..e1ac90b2f 100644
--- a/helpers/path_test.go
+++ b/helpers/path_test.go
@@ -184,7 +184,6 @@ func TestGetDottedRelativePath(t *testing.T) {
for _, f := range []func(string) string{filepath.FromSlash, func(s string) string { return s }} {
doTestGetDottedRelativePath(f, t)
}
-
}
func doTestGetDottedRelativePath(urlFixer func(string) string, t *testing.T) {
@@ -422,7 +421,6 @@ func createTempDirWithZeroLengthFiles() (string, error) {
}
// the dir now has one, zero length file in it
return d, nil
-
}
func createTempDirWithNonZeroLengthFiles() (string, error) {
@@ -451,7 +449,6 @@ func createTempDirWithNonZeroLengthFiles() (string, error) {
// the dir now has one, zero length file in it
return d, nil
-
}
func deleteTempDir(d string) {
@@ -490,7 +487,6 @@ func TestExists(t *testing.T) {
t.Errorf("Test %d failed. Expected %q got %q", i, d.expectedErr, err)
}
}
-
}
func TestAbsPathify(t *testing.T) {
@@ -544,7 +540,6 @@ func TestAbsPathify(t *testing.T) {
}
}
}
-
}
func TestExtNoDelimiter(t *testing.T) {
@@ -611,15 +606,12 @@ func TestFileAndExt(t *testing.T) {
t.Errorf("Test %d failed. Expected extension %q got %q.", i, d.expectedExt, ext)
}
}
-
}
func TestPathPrep(t *testing.T) {
-
}
func TestPrettifyPath(t *testing.T) {
-
}
func TestExtractAndGroupRootPaths(t *testing.T) {
@@ -642,16 +634,19 @@ func TestExtractAndGroupRootPaths(t *testing.T) {
// Make sure the original is preserved
c.Assert(in, qt.DeepEquals, inCopy)
-
}
func TestExtractRootPaths(t *testing.T) {
tests := []struct {
input []string
expected []string
- }{{[]string{filepath.FromSlash("a/b"), filepath.FromSlash("a/b/c/"), "b",
- filepath.FromSlash("/c/d"), filepath.FromSlash("d/"), filepath.FromSlash("//e//")},
- []string{"a", "a", "b", "c", "d", "e"}}}
+ }{{
+ []string{
+ filepath.FromSlash("a/b"), filepath.FromSlash("a/b/c/"), "b",
+ filepath.FromSlash("/c/d"), filepath.FromSlash("d/"), filepath.FromSlash("//e//"),
+ },
+ []string{"a", "a", "b", "c", "d", "e"},
+ }}
for _, test := range tests {
output := ExtractRootPaths(test.input)
@@ -667,7 +662,7 @@ func TestFindCWD(t *testing.T) {
expectedErr error
}
- //cwd, _ := os.Getwd()
+ // cwd, _ := os.Getwd()
data := []test{
//{cwd, nil},
// Commenting this out. It doesn't work properly.