[tools] internal/diff: use ape/patch and ape/diff on Plan 9

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jun 26, 2026, 7:58:27 PM (19 hours ago) Jun 26
to David du Colombier, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, golang...@luci-project-accounts.iam.gserviceaccount.com, Alan Donovan, Peter Weinberger, Richard Miller, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
internal/diff: use ape/patch and ape/diff on Plan 9

TestToUnified and TestVerifyUnified run the system
patch and diff commands to check the unified diffs
produced by the diff package.

On Plan 9, there is no patch command, and the diff
command does not support the unified (-u) output
format, so both tests fail.

This change uses ape/patch and ape/diff, the POSIX
patch and diff commands, on Plan 9.

ape/diff does not emit the "\ No newline at end of
file" marker, so TestVerifyUnified ignores it when
comparing on Plan 9.
Change-Id: I0bee7e95b0eff91bb224bee9fcd4ab4ad656752c
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Alan Donovan <adon...@google.com>
Auto-Submit: Alan Donovan <adon...@google.com>
Auto-Submit: David du Colombier <0in...@gmail.com>
Files:
  • M internal/diff/diff_test.go
  • M internal/diff/difftest/difftest_test.go
Change size: S
Delta: 2 files changed, 25 insertions(+), 6 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I0bee7e95b0eff91bb224bee9fcd4ab4ad656752c
Gerrit-Change-Number: 794840
Gerrit-PatchSet: 2
Gerrit-Owner: David du Colombier <0in...@gmail.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: David du Colombier <0in...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Richard Miller <millerr...@gmail.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-CC: Peter Weinberger <p...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages