Skip to content

Commit

Permalink
Merge pull request #1557 from visualfc/line2
Browse files Browse the repository at this point in the history
cl: offsetFileLine use slash
  • Loading branch information
xushiwei authored Nov 25, 2023
2 parents 8cf27b4 + 7eff8fb commit 87b526f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cl/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion cl/stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 87b526f

Please sign in to comment.