Re: [PATCH 1/2] test: compute expected keyid from fingerprint

2022-09-11 Thread Justus Winter
Tomi Ollila  writes:

> On Fri, Sep 09 2022, Justus Winter wrote:
>
>> ---
>>  test/T350-crypto.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh
>> index 3c6626b4..721cbfdd 100755
>> --- a/test/T350-crypto.sh
>> +++ b/test/T350-crypto.sh
>> @@ -467,7 +467,7 @@ expected='[[[{"id": "X",
>>   "Date": "Sat, 01 Jan 2000 12:00:00 +"},
>>   "body": [{"id": 1,
>>   "sigstatus": [{"status": "error",
>> - "keyid": "6D92612D94E46381",
>> + "keyid": "'$(echo $FINGERPRINT | cut -c 25-)'",
>
> The "bashism" (works also in zsh) ${FINGERPRINT:24} works here
> (and has been used in other lines in this file

Interesting.  FTR, I saw this method being used elsewhere and simply
copied it.  If that'd prevent merging the change, I'd actually prefer
introducing a variable KEYID that is set explicitly in the test library.
The reason for that is that in v5 OpenPGP, the keyid will be computed
differently.

Justus


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH 1/2] test: compute expected keyid from fingerprint

2022-09-11 Thread Tomi Ollila
On Fri, Sep 09 2022, Justus Winter wrote:

> ---
>  test/T350-crypto.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh
> index 3c6626b4..721cbfdd 100755
> --- a/test/T350-crypto.sh
> +++ b/test/T350-crypto.sh
> @@ -467,7 +467,7 @@ expected='[[[{"id": "X",
>   "Date": "Sat, 01 Jan 2000 12:00:00 +"},
>   "body": [{"id": 1,
>   "sigstatus": [{"status": "error",
> - "keyid": "6D92612D94E46381",
> + "keyid": "'$(echo $FINGERPRINT | cut -c 25-)'",

The "bashism" (works also in zsh) ${FINGERPRINT:24} works here
(and has been used in other lines in this file

Tomi

>   "errors": {"key-revoked": true}}],
>   "content-type": "multipart/signed",
>   "content": [{"id": 2,
> -- 
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org