@matheusbsbs / matheus-bagliano / commits / 3df4e3bb09
Fork 0

t6416, t6422: fix incorrect untracked file count

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>

Elijah Newren committed Aug 10, 2020 at 22:29 UTC 3df4e3bb092ec007d1967038baaf9fc39acaff8d
2 files changed +3 -3
t/t6416-recursive-corner-cases.sh
+1 -1
@@ -1144,7 +1144,7 @@ test_expect_failure 'check symlink add/add' '
1144 test_must_fail git merge -s recursive E^0 &&
1145
1146 git ls-files -s >out &&
1147 - test_line_count = 2 out &&
1147 + test_line_count = 3 out &&
1148 git ls-files -u >out &&
1149 test_line_count = 2 out &&
1150 git ls-files -o >out &&
t/t6422-merge-rename-corner-cases.sh
+2 -2
@@ -899,7 +899,7 @@ test_expect_failure 'rad-check: rename/add/delete conflict' '
899 git ls-files -u >file_count &&
900 test_line_count = 2 file_count &&
901 git ls-files -o >file_count &&
902 - test_line_count = 2 file_count &&
902 + test_line_count = 3 file_count &&
903
904 git rev-parse >actual \
905 :2:bar :3:bar &&
@@ -967,7 +967,7 @@ test_expect_failure 'rrdd-check: rename/rename(2to1)/delete/delete conflict' '
967 git ls-files -u >file_count &&
968 test_line_count = 2 file_count &&
969 git ls-files -o >file_count &&
970 - test_line_count = 2 file_count &&
970 + test_line_count = 3 file_count &&
971
972 git rev-parse >actual \
973 :2:baz :3:baz &&