git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] tests: modernise style: more uses of test_line_count

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 11, 2012, 16:52 UTC
Message-ID
<7vy5q2ky7d.fsf@alter.siamese.dyndns.org>
In-Reply-To
<e701486509c3306420e6bcf82e7d0d79fb2e7ae1.1334143281.git.stefano.lattarini@gmail.com>

I'll squash this in, but otherwise it looks good. There is nothing conflicting in flight right now.

Thanks.
 t/t3415-rebase-autosquash.sh         |    4 ++--
 t/t6042-merge-rename-corner-cases.sh |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 5fc366a..a1e86c4 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -33,7 +33,7 @@ test_auto_fixup () {
 	test_tick &&
 	git rebase $2 -i HEAD^^^ &&
 	git log --oneline >actual &&
-	test_line_count = 3 actual
+	test_line_count = 3 actual &&
 	git diff --exit-code $1 &&
 	test 1 = "$(git cat-file blob HEAD^:file1)" &&
 	test 1 = $(git cat-file commit HEAD^ | grep first | wc -l)
@@ -62,7 +62,7 @@ test_auto_squash () {
 	test_tick &&
 	git rebase $2 -i HEAD^^^ &&
 	git log --oneline >actual &&
-	test_line_count = 3 actual
+	test_line_count = 3 actual &&
 	git diff --exit-code $1 &&
 	test 1 = "$(git cat-file blob HEAD^:file1)" &&
 	test 2 = $(git cat-file commit HEAD^ | grep first | wc -l)
diff --git a/t/t6042-merge-rename-corner-cases.sh b/t/t6042-merge-rename-corner-cases.sh
index b8d15fc..466fa38 100755
--- a/t/t6042-merge-rename-corner-cases.sh
+++ b/t/t6042-merge-rename-corner-cases.sh
@@ -104,7 +104,7 @@ test_expect_failure 'conflict caused if rename not detected' '
 	test 0 -eq $(git ls-files -u | wc -l) &&
 	test 0 -eq $(git ls-files -o | wc -l) &&
 
-	test_line_count = 6 c
+	test_line_count = 6 c &&
 	test $(git rev-parse HEAD:a) = $(git rev-parse B:a) &&
 	test $(git rev-parse HEAD:b) = $(git rev-parse A:b)
 '
Previous: Stefano LattariniNext: Junio C Hamano
Message 2 of 4 in “tests: modernise style: more uses of test_line_count”
  1. tests: modernise style: more uses of test_line_countStefano Lattarini, Apr 11, 2012
  2. Junio C HamanoApr 11, 2012
  3. Junio C HamanoApr 11, 2012
  4. Stefano LattariniApr 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.