From ebb97fb7367fb983cffc1935a8fb57e4b80f5249 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Thu, 25 Jan 2024 20:11:31 -0500 Subject: Move funcs package to internal (#1977) Signed-off-by: Dave Henderson --- funcs/filepath_unix_test.go | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 funcs/filepath_unix_test.go (limited to 'funcs/filepath_unix_test.go') 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")) -} -- cgit v1.2.3