Ejemplo n.º 1
0
func TestCleanPathsDefaultReturnsDefaultWhenResultsAbsent(t *testing.T) {
	cleaned := tools.CleanPathsDefault("", ",", []string{"/default"})

	assert.Equal(t, []string{"/default"}, cleaned)
}
Ejemplo n.º 2
0
func determineIncludeExcludePaths(config *config.Configuration, includeArg, excludeArg string) (include, exclude []string) {
	return tools.CleanPathsDefault(includeArg, ",", config.FetchIncludePaths()),
		tools.CleanPathsDefault(excludeArg, ",", config.FetchExcludePaths())
}
Ejemplo n.º 3
0
func TestCleanPathsDefaultReturnsInputWhenResultsPresent(t *testing.T) {
	cleaned := tools.CleanPathsDefault("/foo/bar/", ",", []string{"/default"})

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