Skip to content

Commit a0a321b

Browse files
authored
fix(endtoend): Fix unsafe paths test on Windows (#3215)
Allow for OS specific stderr files
1 parent 44d9242 commit a0a321b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

internal/endtoend/case_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"os"
77
"path/filepath"
8+
"runtime"
89
"strings"
910
"testing"
1011
)
@@ -34,6 +35,7 @@ func parseStderr(t *testing.T, dir, testctx string) []byte {
3435
t.Helper()
3536
paths := []string{
3637
filepath.Join(dir, "stderr", fmt.Sprintf("%s.txt", testctx)),
38+
filepath.Join(dir, fmt.Sprintf("stderr_%s.txt", runtime.GOOS)),
3739
filepath.Join(dir, "stderr.txt"),
3840
}
3941
for _, path := range paths {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# package test
2+
error generating code: invalid file output path: D:/tmp/unsafe.txt

0 commit comments

Comments
 (0)