Fix tests to not launch gpg-agent when not needed.
[pwmd.git] / tests / convert-v2x.test
blobcc38782d94a66ce7657df069c4e19e8c4cdcbdb3
1 #!/bin/bash
2 if [ $# != 0 ]; then
3 USE_AGENT=1
4 fi
6 source common.sh
8 echo Converting from version 2.x ...
9 $PWMD --homedir $WDIR --convert datafile.v2x -o data/datafile-converted \
10 --passphrase-file datafile-v2x.key $@
12 cat > config << EOF
13 [datafile-converted]
14 passphrase_file=`pwd`/datafile-v2x.key
15 EOF
17 launch_pwmd $@ datafile-converted
19 begin_test
20 echo 'DUMP' | pwmc $PWMC_ARGS --key-file datafile-v2x.key \
21 datafile-converted > result
22 cmp convert.result result
23 rm -f result
25 test_success