diff --git a/cl/compile_test.go b/cl/compile_test.go index 52022aebf..3f91ef2c8 100644 --- a/cl/compile_test.go +++ b/cl/compile_test.go @@ -4710,7 +4710,7 @@ func main() { } ` if runtime.GOOS == "windows" { - expected = strings.Replace(expected, "../", `..\foo\`, -1) + expected = strings.Replace(expected, "../", `../foo/`, -1) } gopClTestEx(t, &conf, "main", src, expected) } diff --git a/cl/stmt.go b/cl/stmt.go index 805646b5a..3998dbb19 100644 --- a/cl/stmt.go +++ b/cl/stmt.go @@ -47,7 +47,7 @@ func offsetFileLine(ctx *blockCtx, file string) string { file = filepath.Join(ctx.fileLineWorkingDir, file) } if ret, err := filepath.Rel(ctx.fileLineRoot, file); err == nil { - return ret + return filepath.ToSlash(ret) } return file }