Skip to contentSkip to conversation

t4002: fix test #63 (missing whitespace)

PATCH In review Andreas Herrmann 3 participants 3 messages Jul 25, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t4002: fix test #63 (missing whitespace)

Add missing whitespace between 'test_expect_success' and test case description for last test. Without this, we get:

t4002-diff-basic.sh: line 412: test_expect_successdiff can read from stdin: command not found

---
 t/t4002-diff-basic.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
t/t4002-diff-basic.sh +3 -2
index d524d4057d..e6b6739426 100755
@@ -401,9 +401,10 @@ test_expect_success 'diff-tree B A == diff-tree -R A B' '
 test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
 	git diff-tree -r $tree_B $tree_A >.test-a &&
 	git diff-tree -r -R $tree_A $tree_B >.test-b &&
-	cmp -s .test-a .test-b'
+	cmp -s .test-a .test-b
+'
 
-test_expect_success'diff can read from stdin' '
+test_expect_success 'diff can read from stdin' '
 	test_must_fail git diff --no-index -- MN - < NN |
 		grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
 	test_must_fail git diff --no-index -- MN NN |
Signature · 1 line
2.41.0
#1 lore raw
Quoted 6 lines · Andreas Herrmann

Add missing whitespace between 'test_expect_success' and test case description for last test. Without this, we get:

t4002-diff-basic.sh: line 412: test_expect_successdiff can read from stdin: command not found

Thanks for finding this problem and submitting a fix. You're the second person to do so[1].

[1]: https://lore.kernel.org/git/[email protected]/

t/t4002-diff-basic.sh test_expect_success 'diff-tree B A == diff-tree -R A B' ' · line 405

Quoted 8 lines
t/t4002-diff-basic.sh +2 -1
@@ -401,9 +401,10 @@ test_expect_success 'diff-tree B A == diff-tree -R A B' '
 test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
        git diff-tree -r $tree_B $tree_A >.test-a &&
        git diff-tree -r -R $tree_A $tree_B >.test-b &&
-       cmp -s .test-a .test-b'
+       cmp -s .test-a .test-b
+'

This minor style fixup could be resubmitted as a standalone patch, though it might be too minor to worry about.

Quoted 5 lines
t/t4002-diff-basic.sh +1 -1
-test_expect_success'diff can read from stdin' '
+test_expect_success 'diff can read from stdin' '
        test_must_fail git diff --no-index -- MN - < NN |
                grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
        test_must_fail git diff --no-index -- MN NN |
#2 lore raw
Quoted 5 lines · Eric Sunshine

Thanks for finding this problem and submitting a fix. You're the second person to do so[1].

[1]: https://lore.kernel.org/git/[email protected]/

Quoted 11 lines

t/t4002-diff-basic.sh test_expect_success 'diff-tree B A == diff-tree -R A B' ' · line 405

Quoted 8 lines
t/t4002-diff-basic.sh +2 -1
@@ -401,9 +401,10 @@ test_expect_success 'diff-tree B A == diff-tree -R A B' '
 test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
        git diff-tree -r $tree_B $tree_A >.test-a &&
        git diff-tree -r -R $tree_A $tree_B >.test-b &&
-       cmp -s .test-a .test-b'
+       cmp -s .test-a .test-b
+'

This minor style fixup could be resubmitted as a standalone patch, though it might be too minor to worry about.

Thanks for a quick review and encouraging words. I do not mind a patch with only the above hunk but of course the title and the log message would have to be updated ;-).