From: Christian Couder Date: Fri, 02 Jun 2023 06:50:18 GMT Subject: Re: [PATCH v2 1/2] t/lib-gpg: introduce new prereq GPG2 Message-ID: In-Reply-To: <20230602023105.17979-2-five231003@gmail.com> On Fri, Jun 2, 2023 at 4:31 AM Kousik Sanagavarapu wrote: > +test_lazy_prereq GPG2 ' > + gpg_version=$(gpg --version 2>&1) > + test $? != 127 || exit 1 > + > + case "$gpg_version" in > + "gpg (GnuPG) 0."* | "gpg (GnuPG) 1.*") s/"gpg (GnuPG) 1.*"/"gpg (GnuPG) 1."*/ I am not sure if it changes anything, but for testing if we have v0 here and v1.0.6 in the "test_lazy_prereq PGP", we put the '*' character outside the double quoted string. > + say "This test requires a GPG version >= v2.0.0" > + exit 1 > + ;; > + *) > + (gpgconf --kill all || : ) && > + gpg --homedir "${GNUPGHOME}" --import \ > + "$TEST_DIRECTORY"/lib-gpg/keyring.gpg && > + gpg --homedir "${GNUPGHOME}" --import-ownertrust \ > + "$TEST_DIRECTORY"/lib-gpg/ownertrust && > + gpg --homedir "${GNUPGHOME}" /dev/null \ > + --sign -u committer@example.com > + ;; > + esac > +'