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

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

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