All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todd Zullinger <tmz@pobox.com>
To: Jeff Hostetler <git@jeffhostetler.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Lars Schneider" <larsxschneider@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Torsten Bögershausen" <tboegi@web.de>,
	git@vger.kernel.org
Subject: Re: What's cooking in git.git (Dec 2017, #01; Mon, 4)
Date: Thu, 7 Dec 2017 16:33:12 -0500	[thread overview]
Message-ID: <20171207213312.GB3693@zaya.teonanacatl.net> (raw)
In-Reply-To: <175f87bc-0270-fb18-fc14-24e8f59321d6@jeffhostetler.com>

Jeff Hostetler wrote:
> I'm looking at t5616 now on my mac.
> Looks like the MAC doesn't like my line counting in the tests.
> I'll fix in my next version.

Perhaps that's as simple as using the test_line_counts helper?

diff --git i/t/t5616-partial-clone.sh w/t/t5616-partial-clone.sh
index fa573f8cdb..6d673de90c 100755
--- i/t/t5616-partial-clone.sh
+++ w/t/t5616-partial-clone.sh
@@ -19,7 +19,7 @@ test_expect_success 'setup normal src repo' '
 		git -C src ls-files -s file.$n.txt >>temp
 	done &&
 	awk -f print_2.awk <temp | sort >expect_1.oids &&
-	test "$(wc -l <expect_1.oids)" = "4"
+	test_line_count = 4 expect_1.oids
 '
 
 # bare clone "src" giving "srv.bare" for use as our server.
@@ -76,7 +76,7 @@ test_expect_success 'push new commits to server' '
 	grep blob <temp \
 		| awk -f print_1.awk \
 		| sort >expect_2.oids &&
-	test "$(wc -l <expect_2.oids)" = "8" &&
+	test_line_count = 8 expect_2.oids &&
 	git -C src blame master -- file.1.txt >expect.blame
 '
 
@@ -100,7 +100,7 @@ test_expect_success 'partial fetch inherits filter settings' '
 # it should be in a new packfile (since the promisor boundary is
 # currently a packfile, it should not get unpacked upon receipt.)
 test_expect_success 'verify diff causes dynamic object fetch' '
-	test "$(wc -l <observed.oids)" = "4" &&
+	test_line_count = 4 observed.oids &&
 		cat observed.oids &&
 	git -C pc1 diff master..origin/master -- file.1.txt &&
 	(	cd pc1/.git/objects/pack;
@@ -110,7 +110,7 @@ test_expect_success 'verify diff causes dynamic object fetch' '
 		| awk -f print_1.awk \
 		| sort >observed.oids &&
 		cat observed.oids &&
-	test "$(wc -l <observed.oids)" = "4"
+	test_line_count = 4 observed.oids
 '
 
 # force dynamic object fetch using blame.

-- 
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If quizzes are quizzical, what are tests?


  parent reply	other threads:[~2017-12-07 21:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 21:46 What's cooking in git.git (Dec 2017, #01; Mon, 4) Junio C Hamano
2017-12-04 22:04 ` Jeff Hostetler
2017-12-04 22:26 ` Elijah Newren
2017-12-04 23:46 ` Jonathan Tan
2017-12-05  0:30   ` Junio C Hamano
2017-12-06 15:14 ` Lars Schneider
2017-12-06 16:03   ` Torsten Bögershausen
2017-12-06 16:48     ` Junio C Hamano
2017-12-07 15:48   ` Johannes Schindelin
2017-12-07 20:22     ` Todd Zullinger
2017-12-07 20:50       ` Junio C Hamano
2017-12-07 21:08         ` Lars Schneider
2017-12-07 21:21           ` Junio C Hamano
2017-12-07 21:08     ` Jeff Hostetler
2017-12-07 21:10       ` Junio C Hamano
2017-12-10 10:50         ` [PATCH v1 1/1] check-non-portable-shell.pl: Quoted `wc -l` is not portable tboegi
2017-12-10 13:59           ` Johannes Schindelin
2017-12-11 23:07           ` Junio C Hamano
2017-12-16 19:52         ` [PATCH v2 " tboegi
2017-12-17  0:06           ` Eric Sunshine
2017-12-21 21:26         ` [PATCH v3 " tboegi
2017-12-22 21:07           ` Junio C Hamano
2017-12-23  7:27             ` Torsten Bögershausen
2017-12-07 21:33       ` Todd Zullinger [this message]
2017-12-09 14:46         ` What's cooking in git.git (Dec 2017, #01; Mon, 4) Torsten Bögershausen
2017-12-10 13:50           ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171207213312.GB3693@zaya.teonanacatl.net \
    --to=tmz@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=larsxschneider@gmail.com \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.