Skip to content

Commit 9c1fa03

Browse files
committed
Use filepath.Join for glob patterns
1 parent 7c27cae commit 9c1fa03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/go-yaml/cli_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var flagMapping = map[string]string{
103103

104104
func TestCLI(t *testing.T) {
105105
// Find all test files in testdata/
106-
testFiles, err := filepath.Glob("testdata/*.yaml")
106+
testFiles, err := filepath.Glob(filepath.Join("testdata", "*.yaml"))
107107
if err != nil {
108108
t.Fatalf("Failed to find test files: %v", err)
109109
}
@@ -227,7 +227,7 @@ type CmdTestSuite []CmdTestCase
227227
// TestCLICommands runs command-based tests from testdata/cmd/*.yaml
228228
func TestCLICommands(t *testing.T) {
229229
// Find all test files in testdata/cmd/
230-
testFiles, err := filepath.Glob("testdata/cmd/*.yaml")
230+
testFiles, err := filepath.Glob(filepath.Join("testdata", "cmd", "*.yaml"))
231231
if err != nil {
232232
t.Fatalf("Failed to find test files: %v", err)
233233
}

0 commit comments

Comments
 (0)