author | Javi Merino <cibervicho@gmail.com> |
Mon, 02 Apr 2012 22:25:55 +0100 | |
branch | stable |
changeset 16345 | 825565136235 |
parent 16289 | aae219a99a6e |
child 16349 | 425f1fbcfb94 |
permissions | -rw-r--r-- |
12428 | 1 |
Test the GPG extension |
8809 | 2 |
|
12428 | 3 |
$ "$TESTDIR/hghave" gpg || exit 80 |
16345
825565136235
tests: don't run test-gpg if not in a working directory
Javi Merino <cibervicho@gmail.com>
parents:
16289
diff
changeset
|
4 |
$ if ! hg identify -q > /dev/null; then |
825565136235
tests: don't run test-gpg if not in a working directory
Javi Merino <cibervicho@gmail.com>
parents:
16289
diff
changeset
|
5 |
> echo "skipped: not a Mercurial working dir" >&2 |
825565136235
tests: don't run test-gpg if not in a working directory
Javi Merino <cibervicho@gmail.com>
parents:
16289
diff
changeset
|
6 |
> exit 80 |
825565136235
tests: don't run test-gpg if not in a working directory
Javi Merino <cibervicho@gmail.com>
parents:
16289
diff
changeset
|
7 |
> fi |
12428 | 8 |
$ cat <<EOF >> $HGRCPATH |
9 |
> [extensions] |
|
10 |
> gpg= |
|
11 |
> |
|
12 |
> [gpg] |
|
16289
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
13 |
> cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir $TESTDIR/gpg |
12428 | 14 |
> EOF |
15 |
$ hg init r |
|
16 |
$ cd r |
|
17 |
$ echo foo > foo |
|
18 |
$ hg ci -Amfoo |
|
19 |
adding foo |
|
8809 | 20 |
|
12428 | 21 |
$ hg sigs |
22 |
||
23 |
$ hg sign 0 |
|
24 |
Signing 0:e63c23eaa88a |
|
8809 | 25 |
|
12428 | 26 |
$ hg sigs |
27 |
hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
8809 | 28 |
|
12428 | 29 |
$ hg sigcheck 0 |
30 |
e63c23eaa88a is signed by: |
|
31 |
hgtest |
|
16289
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
32 |
|
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
33 |
verify that this test has not modified the trustdb.gpg file back in |
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
34 |
the main hg working dir |
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
35 |
$ hg --cwd $TESTDIR status gpg |