test_cli.sh (883B)
1 #!/bin/bash 2 3 set -a 4 set -e 5 set -x 6 default_pythonpath=$PYTHONPATH:. 7 export PYTHONPATH=${default_pythonpath:-.} 8 d=`mktemp -d` 9 g=`mktemp -d` 10 11 # works with gnupg 2.2.41 12 export GNUPGHOME=$g 13 gpg --homedir $g --passphrase '' --quick-generate-key --pinentry loopback --yes testuser 14 fp=`gpg --list-keys --homedir $g testuser 2> /dev/null | awk '/^ / {print $1;}'` 15 16 i_foo=`python piknik/runnable/cmd.py -d $d add "foo"` 17 i_bar=`python piknik/runnable/cmd.py -d $d add "bar"` 18 19 python piknik/runnable/cmd.py mod -d $d --accept -i $i_foo 20 python piknik/runnable/cmd.py mod -d $d --finish -i $i_bar 21 python piknik/runnable/cmd.py comment -d $d -s $fp -x bazbazbaz -i $i_foo 22 python piknik/runnable/cmd.py show -d $d 23 python piknik/runnable/cmd.py show -d $d -r html 24 python piknik/runnable/cmd.py show -d $d -i $i_foo 25 python piknik/runnable/cmd.py show -d $d -r html -i $i_bar 26 set +x 27 set +e 28 set +a 29 30 31