diff options
Diffstat (limited to 'git-codereview/sync_test.go')
| -rw-r--r-- | git-codereview/sync_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/git-codereview/sync_test.go b/git-codereview/sync_test.go index a4210ab..72cbdf8 100644 --- a/git-codereview/sync_test.go +++ b/git-codereview/sync_test.go @@ -104,4 +104,22 @@ func TestSyncRebase(t *testing.T) { if len(b.Pending()) != 0 { t.Fatalf("have %d pending CLs after final sync, want 0", len(b.Pending())) } + + // sync -v prints git output. + // also exercising -v parsing. + testMain(t, "sync", "-v=true") + testNoStdout(t) + testPrintedStderr(t, "git pull -q -r origin main") + + testMain(t, "sync", "-v=1") + testNoStdout(t) + testPrintedStderr(t, "git pull -q -r origin main") + + testMain(t, "sync", "-v") + testNoStdout(t) + testPrintedStderr(t, "git pull -q -r origin main") + + testMain(t, "sync", "-v=false") + testNoStdout(t) + testNoStderr(t) } |
