aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/mail_test.go
diff options
context:
space:
mode:
authorPaul Jolly <paul@myitcv.io>2020-05-11 06:16:42 +0100
committerPaul Jolly <paul@myitcv.org.uk>2020-05-15 04:49:42 +0000
commita2b90d2f6e29477343826a7b79798b588394f4aa (patch)
tree9b1e2d3673716948e7051839e2eba4b1e1d970a0 /git-codereview/mail_test.go
parent180dd7fcad2ad38f8a3b778687cac4c1a5ca7627 (diff)
downloadgo-x-review-a2b90d2f6e29477343826a7b79798b588394f4aa.tar.xz
git-codereview: add -wip flag to mail command
Add a -wip flag to the mail command to set the status of a change to work-in-progress. Per: https://gerrit-review.googlesource.com/Documentation/intro-user.html#wip Fixes golang/go#20991 Change-Id: I227beccb55570949e9b0f487d5394855611a118a Reviewed-on: https://go-review.googlesource.com/c/review/+/233237 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Andrew Bonventre <andybons@golang.org>
Diffstat (limited to 'git-codereview/mail_test.go')
-rw-r--r--git-codereview/mail_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-codereview/mail_test.go b/git-codereview/mail_test.go
index 22d4747..c655b54 100644
--- a/git-codereview/mail_test.go
+++ b/git-codereview/mail_test.go
@@ -220,6 +220,19 @@ func TestMailShort(t *testing.T) {
testPrintedStderr(t, "unknown reviewer: missing")
}
+func TestWIP(t *testing.T) {
+ gt := newGitTest(t)
+ defer gt.done()
+ gt.work(t)
+
+ h := CurrentBranch().Pending()[0].ShortHash
+
+ testMain(t, "mail", "-wip")
+ testRan(t,
+ "git push -q origin HEAD:refs/for/master%wip",
+ "git tag -f work.mailed "+h)
+}
+
func TestMailTopic(t *testing.T) {
gt := newGitTest(t)
defer gt.done()