diff mbox series

[v2,04/11] t6416, t6422: fix incorrect untracked file count

Message ID 9ce80f2f943278fcb8ef46fd1a9507d832657246.1596906081.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Start preparing merge-related tests to work with multiple merge backends | expand

Commit Message

Linus Arver via GitGitGadget Aug. 8, 2020, 5:01 p.m. UTC
From: Elijah Newren <newren@gmail.com>

Apparently I don't know how to count untracked files, and since the tests
in question were marked as test_expect_failure, no one every noticed it
until know.  Correct the count, as these tests clearly creates three
untracked files ('out', 'err', and 'file_count').

(I believe this problem arose because earlier incarnations counted lines
via a pipe to 'wc -l'.  Reviewers asked that it be replaced by writing
the output to a file and using test_line_count, but when the temporary
output was added to a separate file, the count of untracked files should
have increased.)

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 t/t6416-recursive-corner-cases.sh    | 2 +-
 t/t6422-merge-rename-corner-cases.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Eric Sunshine Aug. 9, 2020, 3:12 a.m. UTC | #1
On Sat, Aug 8, 2020 at 1:01 PM Elijah Newren via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> Apparently I don't know how to count untracked files, and since the tests
> in question were marked as test_expect_failure, no one every noticed it
> until know.  Correct the count, as these tests clearly creates three
> untracked files ('out', 'err', and 'file_count').

s/every/ever/
s/know/now/
s/creates/create/

> (I believe this problem arose because earlier incarnations counted lines
> via a pipe to 'wc -l'.  Reviewers asked that it be replaced by writing
> the output to a file and using test_line_count, but when the temporary
> output was added to a separate file, the count of untracked files should
> have increased.)
>
> Signed-off-by: Elijah Newren <newren@gmail.com>
Elijah Newren Aug. 9, 2020, 5:34 a.m. UTC | #2
On Sat, Aug 8, 2020 at 8:12 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Sat, Aug 8, 2020 at 1:01 PM Elijah Newren via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> > Apparently I don't know how to count untracked files, and since the tests
> > in question were marked as test_expect_failure, no one every noticed it
> > until know.  Correct the count, as these tests clearly creates three
> > untracked files ('out', 'err', and 'file_count').
>
> s/every/ever/
> s/know/now/
> s/creates/create/

Wow, that's a pretty high typo density; how embarrassing.  Thanks for
pointing out the fixes; I'll include them in the next reroll.
diff mbox series

Patch

diff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh
index b3bf462617..d272b418e4 100755
--- a/t/t6416-recursive-corner-cases.sh
+++ b/t/t6416-recursive-corner-cases.sh
@@ -1144,7 +1144,7 @@  test_expect_failure 'check symlink add/add' '
 		test_must_fail git merge -s recursive E^0 &&
 
 		git ls-files -s >out &&
-		test_line_count = 2 out &&
+		test_line_count = 3 out &&
 		git ls-files -u >out &&
 		test_line_count = 2 out &&
 		git ls-files -o >out &&
diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh
index 7da75c1736..c8ee033ad9 100755
--- a/t/t6422-merge-rename-corner-cases.sh
+++ b/t/t6422-merge-rename-corner-cases.sh
@@ -899,7 +899,7 @@  test_expect_failure 'rad-check: rename/add/delete conflict' '
 		git ls-files -u >file_count &&
 		test_line_count = 2 file_count &&
 		git ls-files -o >file_count &&
-		test_line_count = 2 file_count &&
+		test_line_count = 3 file_count &&
 
 		git rev-parse >actual \
 			:2:bar :3:bar &&
@@ -967,7 +967,7 @@  test_expect_failure 'rrdd-check: rename/rename(2to1)/delete/delete conflict' '
 		git ls-files -u >file_count &&
 		test_line_count = 2 file_count &&
 		git ls-files -o >file_count &&
-		test_line_count = 2 file_count &&
+		test_line_count = 3 file_count &&
 
 		git rev-parse >actual \
 			:2:baz :3:baz &&