3 source import-common.sh
12 passphrase_file=`pwd`/passphrase.key
18 test_header
"Test 1. List root elements."
19 echo -ne 'LIST' | pwmc
$PWMC_ARGS list
> result
20 cmp list.result1 result
24 test_header
"Test 2. List all elements."
25 echo -ne 'LIST --recurse' | pwmc
$PWMC_ARGS list
> result
26 cmp list.result2 result
30 test_header
"Test 3. List single path, verbose with targets."
31 echo -ne 'LIST --recurse a\tb' | pwmc
$PWMC_ARGS list
> result
32 cmp list.result3 result
36 test_header
"Test 4. List single root path (no target)."
37 echo -ne 'LIST --recurse z' | pwmc
$PWMC_ARGS list
> result
38 cmp list.result4 result
42 test_header
"Test 5. List element with target attribute error."
43 echo -ne 'LIST --recurse target-loop-a' | pwmc
$PWMC_ARGS list
> result
44 cmp list.result5 result
48 test_header
"Test 6. Recursion loop flags."
49 echo -ne 'ATTR SET _target c\td a' | pwmc
$PWMC_ARGS -S list
50 echo -ne 'ATTR SET _target a\tb\tc c\td\tb' | pwmc
$PWMC_ARGS -S list
51 echo -ne 'LIST --recurse' | pwmc
$PWMC_ARGS list
> result
52 cmp list.result6 result
57 test_header
"Test 7. Recursion loop flags: no child of target."
58 echo -ne 'ATTR SET _target a\tb\tc c\td' | pwmc
$PWMC_ARGS -S list
59 echo -ne 'LIST --recurse' | pwmc
$PWMC_ARGS list
> result
60 cmp list.result7 result
64 test_header
"Test 8. Recursion loop flags: target not a target."
65 echo -ne 'ATTR SET _target a\tb\tc c' | pwmc
$PWMC_ARGS -S list
66 echo -ne 'LIST --recurse' | pwmc
$PWMC_ARGS list
> result
67 cmp list.result8 result