Thread (39 messages) flat view 39 messages, 6 authors, 2016-06-15

Re: [PATCH 3/3] t5523: test push progress output to tty

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:47

Jeff King wrote:
quoted hunk ↗ jump to hunk
--- a/t/t5523-push-upstream.sh
+++ b/t/t5523-push-upstream.sh
[...]
quoted hunk ↗ jump to hunk
@@ -72,7 +73,14 @@ test_expect_success 'push -u HEAD' '
 	check_config headbranch upstream refs/heads/headbranch
 '
 
-test_expect_success 'progress messages to non-tty' '
+test_expect_success 'progress messages go to tty' '
+	ensure_fresh_upstream &&
+
+	test_terminal git push -u upstream master >out 2>err &&
+	grep "Writing objects" err
+'
Missing TTY prerequisite.  (Do you think test_terminal should check
$prereq to prevent this?)
quoted hunk ↗ jump to hunk
@@ -88,4 +96,18 @@ test_expect_success 'progress messages to non-tty (forced)' '
 	grep "Writing objects" err
 '
 
+test_expect_success 'push -q suppresses progress' '
+	ensure_fresh_upstream &&
+
+	test_terminal git push -u -q upstream master >out 2>err &&
+	! grep "Writing objects" err
+'
Likewise.
+
+test_expect_failure 'push --no-progress suppresses progress' '
+	ensure_fresh_upstream &&
+
+	test_terminal git push -u --no-progress upstream master >out 2>err &&
+	! grep "Writing objects" err
+'
Likewise.

Regards,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help