From: Junio C Hamano Date: Thu, 14 Feb 2019 22:28:21 +0000 (-0800) Subject: Merge branch 'jc/no-grepping-for-strerror-in-tests' X-Git-Tag: v2.21.0-rc2~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4e09a7b54009b6a2038438ee9c5d91102702257d?hp=-c Merge branch 'jc/no-grepping-for-strerror-in-tests' * jc/no-grepping-for-strerror-in-tests: t1404: do not rely on the exact phrasing of strerror() --- 4e09a7b54009b6a2038438ee9c5d91102702257d diff --combined t/t1404-update-ref-errors.sh index 51a4f4c0ac,482d24fa09..6b6a8e2292 --- a/t/t1404-update-ref-errors.sh +++ b/t/t1404-update-ref-errors.sh @@@ -27,7 -27,7 +27,7 @@@ test_update_rejected () fi && printf "create $prefix/%s $C\n" $create >input && test_must_fail git update-ref --stdin output.err && - grep -F "$error" output.err && + test_i18ngrep -F "$error" output.err && git for-each-ref $prefix >actual && test_cmp unchanged actual } @@@ -103,7 -103,7 +103,7 @@@ df_test() printf "%s\n" "delete $delname" "create $addname $D" fi >commands && test_must_fail git update-ref --stdin output.err && - test_cmp expected-err output.err && + test_i18ncmp expected-err output.err && printf "%s\n" "$C $delref" >expected-refs && git for-each-ref --format="%(objectname) %(refname)" $prefix/r >actual-refs && test_cmp expected-refs actual-refs @@@ -559,9 -559,9 +559,9 @@@ test_expect_success 'no bogus intermedi { # Note: the following command is intentionally run in the # background. We increase the timeout so that `update-ref` - # attempts to acquire the `packed-refs` lock for longer than - # it takes for us to do the check then delete it: - git -c core.packedrefstimeout=3000 update-ref -d $prefix/foo & + # attempts to acquire the `packed-refs` lock for much longer + # than it takes for us to do the check then delete it: + git -c core.packedrefstimeout=30000 update-ref -d $prefix/foo & } && pid2=$! && # Give update-ref plenty of time to get to the point where it tries @@@ -614,7 -614,7 +614,7 @@@ test_expect_success 'delete fails clean test_when_finished "rm -f .git/packed-refs.lock" && test_must_fail git update-ref -d $prefix/foo >out 2>err && git for-each-ref $prefix >actual && - test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: File exists" err && + test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: " err && test_cmp unchanged actual '