]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t6416, t6422: fix incorrect untracked file count
authorElijah Newren <newren@gmail.com>
Mon, 10 Aug 2020 22:29:12 +0000 (22:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Aug 2020 22:59:00 +0000 (15:59 -0700)
Apparently I don't know how to count untracked files, and since the
tests in question were marked as test_expect_failure, no one ever
noticed it until now.  Correct the count, as these tests clearly create
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6416-recursive-corner-cases.sh
t/t6422-merge-rename-corner-cases.sh

index b3bf4626178681cd1acb8dc0e7a70d20dcd95cfb..d272b418e4f6cb47adde2b40a52dea11ec1292a0 100755 (executable)
@@ -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 &&
index 7da75c1736d614910596b277ce4c9bee1bb401fe..c8ee033ad9dedfd2a7e3fdc439f6bf4a802721a0 100755 (executable)
@@ -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 &&