コード例 #1
0
func TestCleanPathsDefaultReturnsDefaultWhenResultsAbsent(t *testing.T) {
	cleaned := tools.CleanPathsDefault("", ",", []string{"/default"})

	assert.Equal(t, []string{"/default"}, cleaned)
}
コード例 #2
0
ファイル: commands.go プロジェクト: tidatida/git-lfs
func determineIncludeExcludePaths(config *config.Configuration, includeArg, excludeArg string) (include, exclude []string) {
	return tools.CleanPathsDefault(includeArg, ",", config.FetchIncludePaths()),
		tools.CleanPathsDefault(excludeArg, ",", config.FetchExcludePaths())
}
コード例 #3
0
func TestCleanPathsDefaultReturnsInputWhenResultsPresent(t *testing.T) {
	cleaned := tools.CleanPathsDefault("/foo/bar/", ",", []string{"/default"})

	assert.Equal(t, []string{"/foo/bar"}, cleaned)
}