mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
imports: Limit the amount of text printed in the large token case
If the test fails, it tries to print a million characters. This limits it to just the start of got and want, which is enough to see the imports block anyway. Change-Id: I2c58db8e96e73da436ca16fa8a57c820a95242ca Reviewed-on: https://go-review.googlesource.com/100216 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
059bec968c
commit
c1547a3f90
@ -2090,8 +2090,7 @@ const x = mypkg.Sprintf("%s", "my package")
|
||||
|
||||
// end
|
||||
`
|
||||
|
||||
if got := string(out); got != want {
|
||||
t.Errorf("Process returned unexpected result.\ngot:\n%v\nwant:\n%v", got, want)
|
||||
t.Errorf("Process returned unexpected result.\ngot:\n%.100v\nwant:\n%.100v", got, want)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user