test: Add variable interpolation test

This commit is contained in:
Abhisek Datta
2026-01-08 16:06:18 +05:30
parent f07d8e6a38
commit bb3e001e87
3 changed files with 296 additions and 41 deletions
-15
View File
@@ -50,18 +50,3 @@ func ContainsGlob(pattern string) bool {
strings.Contains(pattern, "?") ||
strings.Contains(pattern, "[")
}
// ExpandPathList expands variables in a list of paths/patterns.
func ExpandPathList(patterns []string) ([]string, error) {
result := make([]string, 0, len(patterns))
for _, pattern := range patterns {
expanded, err := ExpandVariables(pattern)
if err != nil {
return nil, err
}
result = append(result, expanded)
}
return result, nil
}