aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_linux_test.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2015-06-05 14:23:54 -0700
committerRob Pike <r@golang.org>2015-06-12 20:14:14 +0000
commit57f4b43078e5f24a08088fb5ef91bc9f0e432015 (patch)
tree590a340a955bacd999e4c76b162b78db9040b603 /src/syscall/exec_linux_test.go
parentab89378cb73003058d1f9707535610af468752fc (diff)
downloadgo-57f4b43078e5f24a08088fb5ef91bc9f0e432015.tar.xz
fmt: require newlines to match when scanning with a format
The documentation says that newlines behave like this: Scan etc.: newlines are spaces. Scanln etc.: newlines terminate the scan. Scanf etc.: newlines must match in input and format. The code did not implement this behavior in all cases, especially for Scanf. Make it behave: - Fix the handling of spaces and newlines in ss.Advance. The code is longer but now behaves as it should. - Delete the reuse of the current ss in newScanState. There is really no need, since it's only used in recursive calls to Scan etc., and the flags are likely wrong. Simpler just to allocate a new one every time, and likelier to be correct. Fixes #10862. Change-Id: If060ac021017346723b0d62de4e5a305da898f68 Reviewed-on: https://go-review.googlesource.com/10991 Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/syscall/exec_linux_test.go')
0 files changed, 0 insertions, 0 deletions