Skip to content

Commit dee8b71

Browse files
ramsay-jonesgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8279ed0 commit dee8b71

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

t/t4151-am-abort.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ do
4646

4747
test_expect_success "am$with3 --skip continue after failed am$with3" '
4848
test_must_fail git am$with3 --skip >output &&
49-
test_i18ngrep "^Applying" output >output.applying &&
50-
test_i18ngrep "^Applying: 6$" output.applying &&
51-
test_i18ncmp file-2-expect file-2 &&
49+
test_i18ngrep "^Applying: 6$" output &&
50+
test_cmp file-2-expect file-2 &&
5251
test ! -f .git/MERGE_RR
5352
'
5453

0 commit comments

Comments
 (0)