1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-25 11:47:32 +02:00

t4151: consolidate multiple calls to test_i18ngrep

Attempting to grep the output of test_i18ngrep will not work under a
poison build, since the output is (almost) guaranteed not to have the
string you are looking for. In this case, we have a test_i18ngrep call
which attempts to filter the contents of a file, which was itself the
result of a call to test_i18ngrep. In this case, we can achieve the
same effect with a single call to test_i18ngrep (without creating the
intermediate file), since the second regular expression can be used
without change to filter the original input.

Also, replace a call to test_i18ncmp with test_cmp, since the content
being compared is not subject to i18n anyway.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ramsay Jones 2018-02-12 00:17:20 +00:00 committed by Junio C Hamano
parent 8279ed033f
commit dee8b71e44

View File

@ -46,9 +46,8 @@ do
test_expect_success "am$with3 --skip continue after failed am$with3" '
test_must_fail git am$with3 --skip >output &&
test_i18ngrep "^Applying" output >output.applying &&
test_i18ngrep "^Applying: 6$" output.applying &&
test_i18ncmp file-2-expect file-2 &&
test_i18ngrep "^Applying: 6$" output &&
test_cmp file-2-expect file-2 &&
test ! -f .git/MERGE_RR
'