3 source import-common.sh
12 passphrase_file=`pwd`/list.key
16 mv -f data
/list data
/rename
20 echo "Test 1. Rename to self (fail)."
22 echo -ne 'RENAME d\te e' | pwmc
$PWMC_ARGS -S rename
23 if [ ${PIPESTATUS[1]} == 0 ]; then
24 echo "The previous command should have failed. Stopping."
31 echo "Test 2. Rename to self target (fail)."
33 echo -ne 'RENAME b a' | pwmc
$PWMC_ARGS -S rename
34 if [ ${PIPESTATUS[1]} == 0 ]; then
35 echo "The previous command should have failed. Stopping."
42 echo "Test 3. Rename to self target."
43 echo -ne 'RENAME !b a' | pwmc
$PWMC_ARGS -S rename
44 echo -ne 'LIST --all --with-target' | pwmc
$PWMC_ARGS rename
> result
45 cmp rename.result3 result
49 echo "Test 4. Rename."
50 echo -ne 'RENAME !a b' | pwmc
$PWMC_ARGS -S rename
51 echo -ne 'LIST --all --with-target' | pwmc
$PWMC_ARGS rename
> result
52 cmp rename.result4 result