summaryrefslogtreecommitdiff
path: root/funcs/filepath_unix_test.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-01-25 20:11:31 -0500
committerGitHub <noreply@github.com>2024-01-25 20:11:31 -0500
commitebb97fb7367fb983cffc1935a8fb57e4b80f5249 (patch)
tree43ef6cd01f629f60f59efe1e5b003f7c8e3a1257 /funcs/filepath_unix_test.go
parentf1d9158ea99abbe556251c1ff2fe970f3b460ee9 (diff)
Move funcs package to internal (#1977)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'funcs/filepath_unix_test.go')
-rw-r--r--funcs/filepath_unix_test.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/funcs/filepath_unix_test.go b/funcs/filepath_unix_test.go
deleted file mode 100644
index 381e7432..00000000
--- a/funcs/filepath_unix_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-//go:build !windows
-// +build !windows
-
-package funcs
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestFilePathFuncs(t *testing.T) {
- t.Parallel()
-
- f := &FilePathFuncs{}
- assert.Equal(t, "bar", f.Base("foo/bar"))
- assert.Equal(t, "bar", f.Base("/foo/bar"))
-
- assert.Equal(t, "/foo/baz", f.Clean("/foo/bar/../baz"))
- assert.Equal(t, "foo", f.Dir("foo/bar"))
- assert.Equal(t, ".txt", f.Ext("/foo/bar/baz.txt"))
- assert.False(t, f.IsAbs("foo/bar"))
- assert.True(t, f.IsAbs("/foo/bar"))
- assert.Equal(t, "foo/bar/qux", f.Join("foo", "bar", "baz", "..", "qux"))
- m, _ := f.Match("*.txt", "foo.json")
- assert.False(t, m)
- m, _ = f.Match("*.txt", "foo.txt")
- assert.True(t, m)
- r, _ := f.Rel("/foo/bar", "/foo/bar/baz")
- assert.Equal(t, "baz", r)
- assert.Equal(t, []string{"/foo/bar/", "baz"}, f.Split("/foo/bar/baz"))
- assert.Equal(t, "", f.VolumeName("/foo/bar"))
-}