Re: [PATCHv5 9/9] t3301: Modernize

Subsystems: the rest

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCHv5 9/9] t3301: Modernize

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:55

Johan Herland [off-list ref] writes:
On Wed, Nov 12, 2014 at 2:57 AM, Eric Sunshine [off-list ref] wrote:
quoted
On Tue, Nov 11, 2014 at 7:40 PM, Johan Herland [off-list ref] wrote:
quoted
+       test_line_count = 1 actual
Broken &&-chain. This problem is repeated each place use invoke
test_line_count().
Thanks. Fixed in the next iteration.

...Johan
Just FYI, here is what I came up with on top of 9/9 as 10/9, and it
can be squashed in.  If these will be the only differences between
v5 and upcoming v6, you can just tell me to squash them together.

One unrelated changes is that '\'' is a bit shorter than '"'"' (and
the four-letter sequence is idiomatic and easier to spot, once your
eyes are used to reading strings in single-quote pairs).

Thanks.
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 861c159..245406a 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -53,7 +53,7 @@ test_expect_success 'create notes' '
 	MSG=b4 git notes add &&
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
-	test_line_count = 1 actual
+	test_line_count = 1 actual &&
 	test "b4" = "$(git notes show)" &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
@@ -67,7 +67,7 @@ test_expect_success 'show notes entry with %N' '
 
 test_expect_success 'create reflog entry' '
 	cat <<-EOF >expect &&
-		a1d8fa6 refs/notes/commits@{0}: notes: Notes added by '"'"'git notes add'"'"'
+		a1d8fa6 refs/notes/commits@{0}: notes: Notes added by '\''git notes add'\''
 	EOF
 	git reflog show refs/notes/commits >actual &&
 	test_cmp expect actual
@@ -77,7 +77,7 @@ test_expect_success 'edit existing notes' '
 	MSG=b3 git notes edit &&
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
-	test_line_count = 1 actual
+	test_line_count = 1 actual &&
 	test "b3" = "$(git notes show)" &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
@@ -87,7 +87,7 @@ test_expect_success 'cannot "git notes add -m" where notes already exists' '
 	test_must_fail git notes add -m "b2" &&
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
-	test_line_count = 1 actual
+	test_line_count = 1 actual &&
 	test "b3" = "$(git notes show)" &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
@@ -97,7 +97,7 @@ test_expect_success 'can overwrite existing note with "git notes add -f -m"' '
 	git notes add -f -m "b1" &&
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
-	test_line_count = 1 actual
+	test_line_count = 1 actual &&
 	test "b1" = "$(git notes show)" &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
@@ -107,7 +107,7 @@ test_expect_success 'add w/no options on existing note morphs into edit' '
 	MSG=b2 git notes add &&
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
-	test_line_count = 1 actual
+	test_line_count = 1 actual &&
 	test "b2" = "$(git notes show)" &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
@@ -117,7 +117,7 @@ test_expect_success 'can overwrite existing note with "git notes add -f"' '
 	MSG=b1 git notes add -f &&
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
-	test_line_count = 1 actual
+	test_line_count = 1 actual &&
 	test "b1" = "$(git notes show)" &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
-- 
2.2.0-rc1-84-gcd6439f

Re: [PATCHv5 9/9] t3301: Modernize

From: Johan Herland <hidden>
Date: 2016-06-15 23:02:55

On Wed, Nov 12, 2014 at 10:18 PM, Junio C Hamano [off-list ref] wrote:
Johan Herland [off-list ref] writes:
quoted
On Wed, Nov 12, 2014 at 2:57 AM, Eric Sunshine [off-list ref] wrote:
quoted
On Tue, Nov 11, 2014 at 7:40 PM, Johan Herland [off-list ref] wrote:
quoted
+       test_line_count = 1 actual
Broken &&-chain. This problem is repeated each place use invoke
test_line_count().
Thanks. Fixed in the next iteration.
Just FYI, here is what I came up with on top of 9/9 as 10/9, and it
can be squashed in.  If these will be the only differences between
v5 and upcoming v6, you can just tell me to squash them together.
So far this is the only diff on top of v5. I've squashed it into my
tree, so if a re-roll is needed, this diff will also be part of it.
But if no other issues show up to trigger a re-roll, then please
squash them on your end as well.
One unrelated changes is that '\'' is a bit shorter than '"'"' (and
the four-letter sequence is idiomatic and easier to spot, once your
eyes are used to reading strings in single-quote pairs).
Agreed, thanks.

...Johan

-- 
Johan Herland, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help