Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: [PATCH 8/7] tests: Fix race condition in t7006-pager

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:19
Subsystem: the rest · Maintainer: Linus Torvalds

Jonathan Nieder wrote:
Johannes Sixt wrote:
quoted
Don't the following pager settings suffer from a race condition?
Yes.  Thanks for noticing.
And to save the reader time wondering: yes, the following examples
suffer from the same race, but if they are used then we _want_ the
test to fail.  It might make sense to squash them in anyway to make
the patch more self-explanatory.

There is also an instance of PAGER='cat > paginated.out'; since the
pager string only starts with but does not equal "cat", this works
fine.  It needed for test ‘12: color when writing to a pager’ to be
able to read the paginated output.
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index ec6fd06..d9202d5 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -157,7 +157,7 @@ test_expect_success TTY 'PAGER overrides default pager' '
 unset GIT_PAGER
 rm -f core.pager_used
 test_expect_success TTY 'core.pager overrides PAGER' '
-	PAGER=: &&
+	PAGER=wc &&
 	export PAGER &&
 	git config core.pager "wc > core.pager_used" &&
 	test_terminal git log &&
@@ -166,7 +166,7 @@ test_expect_success TTY 'core.pager overrides PAGER' '
 
 rm -f GIT_PAGER_used
 test_expect_success TTY 'GIT_PAGER overrides core.pager' '
-	git config core.pager : &&
+	git config core.pager wc &&
 	GIT_PAGER="wc > GIT_PAGER_used" &&
 	export GIT_PAGER &&
 	test_terminal git log &&
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help