Mercurial > hg
changeset 12428:3aa7b6445aad
tests: unify test-gpg
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Sep 2010 13:41:32 -0500 |
parents | f933b99eeb14 |
children | 01c6be8361df |
files | tests/test-gpg tests/test-gpg.out tests/test-gpg.t |
diffstat | 3 files changed, 27 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-gpg Sun Sep 26 13:41:32 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -#!/bin/sh - -"$TESTDIR/hghave" gpg || exit 80 - -cat <<EOF >> $HGRCPATH -[extensions] -gpg= - -[gpg] -cmd=gpg --no-permission-warning --no-secmem-warning --homedir $TESTDIR/gpg -EOF - -hg init r -cd r -echo foo > foo -hg ci -Amfoo - -echo '% no signatures' -hg sigs - -echo '% hg sign 0' -hg sign 0 - -echo '% hg sigs' -hg sigs - -echo '% hg sigcheck 0' -hg sigcheck 0
--- a/tests/test-gpg.out Sun Sep 26 13:41:32 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -adding foo -% no signatures -% hg sign 0 -Signing 0:e63c23eaa88a -% hg sigs -hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 -% hg sigcheck 0 -e63c23eaa88a is signed by: - hgtest
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-gpg.t Sun Sep 26 13:41:32 2010 -0500 @@ -0,0 +1,27 @@ +Test the GPG extension + + $ "$TESTDIR/hghave" gpg || exit 80 + $ cat <<EOF >> $HGRCPATH + > [extensions] + > gpg= + > + > [gpg] + > cmd=gpg --no-permission-warning --no-secmem-warning --homedir $TESTDIR/gpg + > EOF + $ hg init r + $ cd r + $ echo foo > foo + $ hg ci -Amfoo + adding foo + + $ hg sigs + + $ hg sign 0 + Signing 0:e63c23eaa88a + + $ hg sigs + hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 + + $ hg sigcheck 0 + e63c23eaa88a is signed by: + hgtest