mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: fix TestGdbConst on windows
Some (all?) versions of gdb on windows output "\r\n" as line ending instead of "\n". Fixes #22012 Change-Id: I798204fd9f616d6d2c9c28eb5227fadfc63c0d45 Reviewed-on: https://go-review.googlesource.com/65850 Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
45395b5ad6
commit
5e92c41128
1 changed files with 2 additions and 2 deletions
|
|
@ -431,11 +431,11 @@ func TestGdbConst(t *testing.T) {
|
||||||
}
|
}
|
||||||
got, _ := exec.Command("gdb", args...).CombinedOutput()
|
got, _ := exec.Command("gdb", args...).CombinedOutput()
|
||||||
|
|
||||||
sgot := string(got)
|
sgot := strings.Replace(string(got), "\r\n", "\n", -1)
|
||||||
|
|
||||||
t.Logf("output %q", sgot)
|
t.Logf("output %q", sgot)
|
||||||
|
|
||||||
if strings.Index(sgot, "\n$1 = 42\n$2 = 18446744073709551615\n$3 = -1\n$4 = 1 '\\001'") < 0 {
|
if !strings.Contains(sgot, "\n$1 = 42\n$2 = 18446744073709551615\n$3 = -1\n$4 = 1 '\\001'") {
|
||||||
t.Fatalf("output mismatch")
|
t.Fatalf("output mismatch")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue