Skip to content

Commit

Permalink
tests: skip RFC1991 tests for gnupg 2.1
Browse files Browse the repository at this point in the history
GnuPG >= 2.1.0 no longer supports RFC1991, so skip these tests.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Christian Hesse authored and Junio C Hamano committed Dec 12, 2014
1 parent b41a36e commit c0e0ed6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions t/lib-gpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ else
gpg --homedir "${GNUPGHOME}" --import-ownertrust \
"$TEST_DIRECTORY"/lib-gpg/ownertrust
test_set_prereq GPG
if echo | gpg --homedir "${GNUPGHOME}" -b --rfc1991 >/dev/null 2>&1
then
test_set_prereq RFC1991
fi
;;
esac
fi
Expand Down
14 changes: 7 additions & 7 deletions t/t7004-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ test_expect_success GPG \
get_tag_header rfc1991-signed-tag $commit commit $time >expect
echo "RFC1991 signed tag" >>expect
echo '-----BEGIN PGP MESSAGE-----' >>expect
test_expect_success GPG \
test_expect_success GPG,RFC1991 \
'creating a signed tag with rfc1991' '
echo "rfc1991" >gpghome/gpg.conf &&
git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
Expand All @@ -1095,21 +1095,21 @@ cp "$1" actual
EOF
chmod +x fakeeditor

test_expect_success GPG \
test_expect_success GPG,RFC1991 \
'reediting a signed tag body omits signature' '
echo "rfc1991" >gpghome/gpg.conf &&
echo "RFC1991 signed tag" >expect &&
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
test_cmp expect actual
'

test_expect_success GPG \
test_expect_success GPG,RFC1991 \
'verifying rfc1991 signature' '
echo "rfc1991" >gpghome/gpg.conf &&
git tag -v rfc1991-signed-tag
'

test_expect_success GPG \
test_expect_success GPG,RFC1991 \
'list tag with rfc1991 signature' '
echo "rfc1991" >gpghome/gpg.conf &&
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
Expand All @@ -1123,12 +1123,12 @@ test_expect_success GPG \

rm -f gpghome/gpg.conf

test_expect_success GPG \
test_expect_success GPG,RFC1991 \
'verifying rfc1991 signature without --rfc1991' '
git tag -v rfc1991-signed-tag
'

test_expect_success GPG \
test_expect_success GPG,RFC1991 \
'list tag with rfc1991 signature without --rfc1991' '
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
git tag -l -n1 rfc1991-signed-tag >actual &&
Expand All @@ -1139,7 +1139,7 @@ test_expect_success GPG \
test_cmp expect actual
'

test_expect_success GPG \
test_expect_success GPG,RFC1991 \
'reediting a signed tag body omits signature' '
echo "RFC1991 signed tag" >expect &&
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
Expand Down

0 comments on commit c0e0ed6

Please sign in to comment.