##// END OF EJS Templates
tests: don't run test-gpg if not in a working directory...
Javi Merino -
r16345:82556513 stable
parent child Browse files
Show More
@@ -1,31 +1,35
1 Test the GPG extension
1 Test the GPG extension
2
2
3 $ "$TESTDIR/hghave" gpg || exit 80
3 $ "$TESTDIR/hghave" gpg || exit 80
4 $ if ! hg identify -q > /dev/null; then
5 > echo "skipped: not a Mercurial working dir" >&2
6 > exit 80
7 > fi
4 $ cat <<EOF >> $HGRCPATH
8 $ cat <<EOF >> $HGRCPATH
5 > [extensions]
9 > [extensions]
6 > gpg=
10 > gpg=
7 >
11 >
8 > [gpg]
12 > [gpg]
9 > cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir $TESTDIR/gpg
13 > cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir $TESTDIR/gpg
10 > EOF
14 > EOF
11 $ hg init r
15 $ hg init r
12 $ cd r
16 $ cd r
13 $ echo foo > foo
17 $ echo foo > foo
14 $ hg ci -Amfoo
18 $ hg ci -Amfoo
15 adding foo
19 adding foo
16
20
17 $ hg sigs
21 $ hg sigs
18
22
19 $ hg sign 0
23 $ hg sign 0
20 Signing 0:e63c23eaa88a
24 Signing 0:e63c23eaa88a
21
25
22 $ hg sigs
26 $ hg sigs
23 hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0
27 hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0
24
28
25 $ hg sigcheck 0
29 $ hg sigcheck 0
26 e63c23eaa88a is signed by:
30 e63c23eaa88a is signed by:
27 hgtest
31 hgtest
28
32
29 verify that this test has not modified the trustdb.gpg file back in
33 verify that this test has not modified the trustdb.gpg file back in
30 the main hg working dir
34 the main hg working dir
31 $ hg --cwd $TESTDIR status gpg
35 $ hg --cwd $TESTDIR status gpg
General Comments 0
You need to be logged in to leave comments. Login now