-i is now optional for encryption if recipient specified, -R exchanged with -r, added virtual env for manual tests in tests/env/

This commit is contained in:
TLINDEN
2013-11-03 14:39:16 +01:00
parent bf5556e1ec
commit 79068fce66
29 changed files with 944 additions and 1515 deletions

View File

@@ -61,7 +61,7 @@ dxmorg@florida.cops.gov
</test>
<test check-if-delete-public-key-works>
cmd = $pcp -V $vault -r -i 0x0E4512BE47CE0215
cmd = $pcp -V $vault -R -i 0x0E4512BE47CE0215
expect = /Public key deleted/
</test>
@@ -138,7 +138,7 @@ md5msg = 66b8c4ca9e5d2a7e3c0559c3cdea3d50
# derived by name
<test check-dcrypto-init>
<test check-dcrypto-alicia-export-derived-byname>
cmd = $pcp -V va -p -R Bobby -x a -O testpub-forbobby-name
cmd = $pcp -V va -p -r Bobby -x a -O testpub-forbobby-name
expect-file = testpub-forbobby-name
</test>
<test check-dcrypto-bobby-import-byname>
@@ -157,7 +157,7 @@ md5msg = 66b8c4ca9e5d2a7e3c0559c3cdea3d50
# repeat, but now use derived keys in both directions
<test check-dcrypto-bobby-export-derived-byname>
cmd = $pcp -V vb -p -R Alicia -x b -O testpub-foralicia-name
cmd = $pcp -V vb -p -r Alicia -x b -O testpub-foralicia-name
expect-file = testpub-foralicia-name
</test>
<test check-dcrypto-alicia-import-byname>
@@ -166,7 +166,7 @@ md5msg = 66b8c4ca9e5d2a7e3c0559c3cdea3d50
</test>
<test check-dcrypto-bobby-encrypt-byname-both>
id = grep Key-ID testpub-forbobby-name | sed 's/^ //g' | cut -d' ' -f2
cmd = $pcp -V vb -e -i %{id} -I testmessage -O testencrypted-name -x b -R Alicia
cmd = $pcp -V vb -e -i %{id} -I testmessage -O testencrypted-name -x b -r Alicia
expect = /success/
</test>
<test check-dcrypto-alicia-decrypt-byname-both>
@@ -189,27 +189,27 @@ md5msg = 66b8c4ca9e5d2a7e3c0559c3cdea3d50
</test>
<test check-import-without-id-error>
cmd = $pcp -V $vault -r
cmd = $pcp -V $vault -R
expect = /You need to specify a key id/
</test>
<test check-catch-invalid-short-keyid>
cmd = $pcp -V $vault -r -i 0x1
cmd = $pcp -V $vault -R -i 0x1
expect = /is too short/
</test>
<test check-catch-invalid-long-keyid>
cmd = $pcp -V $vault -r -i 0x1111111111111111111111111
cmd = $pcp -V $vault -R -i 0x1111111111111111111111111
expect = /is too long/
</test>
<test check-catch-invalid-long-keyid-without-0x>
cmd = $pcp -V $vault -r -i 11111111111111111
cmd = $pcp -V $vault -R -i 11111111111111111
expect = /is too long/
</test>
<test check-catch-delete-nonexist>
cmd = $pcp -V $vault -r -i 0x0101010101010101
cmd = $pcp -V $vault -R -i 0x0101010101010101
expect = /No key with id 0x010101/
</test>