Re: [PATCH 3/3] sha1-name: mark get_oid() error messages for translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 29, 2020 at 01:42:50PM -0800, Junio C Hamano wrote:

> >> -	fatal: Path '$2$3' $4, but not ${5:-$SQ$3$SQ}.
> >> -	Did you mean '$1:$2$3'${2:+ aka $SQ$1:./$3$SQ}?
> >> +	fatal: path '$2$3' $4, but not ${5:-$SQ$3$SQ}
> >> +	hint: Did you mean '$1:$2$3'${2:+ aka $SQ$1:./$3$SQ}?
> >>  	EOF
> >>  	test_cmp expected error
> >
> > ...this obviously would not allow GIT_TEST_GETTEXT_POISON test to
> > pass.  And ...

Hrmph. I know I tested with GETTEXT_POISON, but you are obviously right
that this doesn't pass. I must have botched something in one of my
rebase passes at the end.

Thanks for catching it, but...

> I'll queue this band-aid on top before making my last pushout for
> the day.  Even with poisoned i18n/l10n, die(_(msg)) gives "fatal:"
> prefix at the beginning, so that is what test_did_you_mean would
> expect to see from a passing test under GIT_TEST_GETTEXT_POISON.
> 
> The other hunk is about a test that greps in "error".

I think we can do this much more simply, by just using i18ncmp:

diff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh
index c2b5125c12..62085a89e3 100755
--- a/t/t1506-rev-parse-diagnosis.sh
+++ b/t/t1506-rev-parse-diagnosis.sh
@@ -12,7 +12,7 @@ test_did_you_mean ()
 	fatal: path '$2$3' $4, but not ${5:-$SQ$3$SQ}
 	hint: Did you mean '$1:$2$3'${2:+ aka $SQ$1:./$3$SQ}?
 	EOF
-	test_cmp expected error
+	test_i18ncmp expected error
 }
 
 HASH_file=

(we'd still need the s/grep/test_i18ngrep/ in your second hunk).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux