git-lfs/tools/filetools_test.go
2016-08-02 10:17:54 -06:00

21 lines
427 B
Go

package tools_test
import (
"testing"
"github.com/github/git-lfs/tools"
"github.com/stretchr/testify/assert"
)
func TestCleanPathsCleansPaths(t *testing.T) {
cleaned := tools.CleanPaths("/foo/bar/,/foo/bar/baz", ",")
assert.Equal(t, []string{"/foo/bar", "/foo/bar/baz"}, cleaned)
}
func TestCleanPathsReturnsNoResultsWhenGivenNoPaths(t *testing.T) {
cleaned := tools.CleanPaths("", ",")
assert.Empty(t, cleaned)
}