{"thread":{"id":"47810","subject":"[PATCH 1/2] t4151: consolidate multiple calls to test_i18ngrep","startedAt":"2018-02-12T00:17:26Z","lastAt":"2018-02-12T00:17:26Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"339025","messageId":"24dd5405-2112-612f-fc0a-f746ace6b292@ramsayjones.plus.com","threadId":"47810","inReplyTo":null,"subject":"[PATCH 1/2] t4151: consolidate multiple calls to test_i18ngrep","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-02-12T00:17:20Z","receivedAt":"2018-02-12T00:17:26Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nAttempting to grep the output of test_i18ngrep will not work under a\npoison build, since the output is (almost) guaranteed not to have the\nstring you are looking for. In this case, we have a test_i18ngrep call\nwhich attempts to filter the contents of a file, which was itself the\nresult of a call to test_i18ngrep. In this case, we can achieve the\nsame effect with a single call to test_i18ngrep (without creating the\nintermediate file), since the second regular expression can be used\nwithout change to filter the original input.\n\nAlso, replace a call to test_i18ncmp with test_cmp, since the content\nbeing compared is not subject to i18n anyway.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n t/t4151-am-abort.sh | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh\nindex 9473c2779..16432781d 100755\n--- a/t/t4151-am-abort.sh\n+++ b/t/t4151-am-abort.sh\n@@ -46,9 +46,8 @@ do\n \n \ttest_expect_success \"am$with3 --skip continue after failed am$with3\" '\n \t\ttest_must_fail git am$with3 --skip >output &&\n-\t\ttest_i18ngrep \"^Applying\" output >output.applying &&\n-\t\ttest_i18ngrep \"^Applying: 6$\" output.applying &&\n-\t\ttest_i18ncmp file-2-expect file-2 &&\n+\t\ttest_i18ngrep \"^Applying: 6$\" output &&\n+\t\ttest_cmp file-2-expect file-2 &&\n \t\ttest ! -f .git/MERGE_RR\n \t'\n \n-- \n2.16.0\n"}]}