git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] t1410: use test_line_count
@ 2019-11-26 18:21 René Scharfe
  2019-11-26 22:15 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: René Scharfe @ 2019-11-26 18:21 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano, Johannes Schindelin

Use test_line_count to check if the number of lines matches
expectations, for improved consistency and nicer debug output.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 t/t1410-reflog.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 82950c0282..76d9b744a6 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -195,7 +195,7 @@ test_expect_success 'delete' '

 	git reflog delete master@{1} &&
 	git reflog show master > output &&
-	test $(($master_entry_count - 1)) = $(wc -l < output) &&
+	test_line_count = $(($master_entry_count - 1)) output &&
 	test $HEAD_entry_count = $(git reflog | wc -l) &&
 	! grep ox < output &&

@@ -209,7 +209,7 @@ test_expect_success 'delete' '

 	git reflog delete master@{07.04.2005.15:15:00.-0700} &&
 	git reflog show master > output &&
-	test $(($master_entry_count - 1)) = $(wc -l < output) &&
+	test_line_count = $(($master_entry_count - 1)) output &&
 	! grep dragon < output

 '
--
2.24.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] t1410: use test_line_count
  2019-11-26 18:21 [PATCH] t1410: use test_line_count René Scharfe
@ 2019-11-26 22:15 ` Johannes Schindelin
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2019-11-26 22:15 UTC (permalink / raw)
  To: René Scharfe; +Cc: Git Mailing List, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]

Hi René,

On Tue, 26 Nov 2019, René Scharfe wrote:

> Use test_line_count to check if the number of lines matches
> expectations, for improved consistency and nicer debug output.
>
> Signed-off-by: René Scharfe <l.s.r@web.de>

ACK!

Thanks,
Dscho

> ---
>  t/t1410-reflog.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
> index 82950c0282..76d9b744a6 100755
> --- a/t/t1410-reflog.sh
> +++ b/t/t1410-reflog.sh
> @@ -195,7 +195,7 @@ test_expect_success 'delete' '
>
>  	git reflog delete master@{1} &&
>  	git reflog show master > output &&
> -	test $(($master_entry_count - 1)) = $(wc -l < output) &&
> +	test_line_count = $(($master_entry_count - 1)) output &&
>  	test $HEAD_entry_count = $(git reflog | wc -l) &&
>  	! grep ox < output &&
>
> @@ -209,7 +209,7 @@ test_expect_success 'delete' '
>
>  	git reflog delete master@{07.04.2005.15:15:00.-0700} &&
>  	git reflog show master > output &&
> -	test $(($master_entry_count - 1)) = $(wc -l < output) &&
> +	test_line_count = $(($master_entry_count - 1)) output &&
>  	! grep dragon < output
>
>  '
> --
> 2.24.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-26 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 18:21 [PATCH] t1410: use test_line_count René Scharfe
2019-11-26 22:15 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).