3 # Tests for the LIST protocol command.
8 .
$AM_SRCDIR/import-common.sh
12 cat >$OUTDIR/config
<< EOF
17 passphrase_file=$WDIR/passphrase.key
23 run_pwmc
"list" >result
$DEVNULL <<EOF
26 test_result
$test_n $? list
"List root elements."
31 test_result
$test_n $? list
"List recursive."
35 list_recurse list
"a b"
36 test_result
$test_n $? list
"List specific path and verbose with targets."
41 test_result
$test_n $? list
"List specific root path without target."
45 list_recurse list
"target-loop-a"
46 test_result
$test_n $? list
"List element with ELOOP target."
50 run_pwmc
"-S list" $DEVNULL <<EOF
51 ATTR SET _target c d a
55 run_pwmc
"-S list" $DEVNULL <<EOF
56 ATTR SET _target a b c c d b
61 test_result
$test_n $e list
"Recursion loop flags."
65 run_pwmc
"-S list" $DEVNULL <<EOF
66 ATTR SET _target a b c c d
69 test_result
$test_n $? list
"Recursion loop of target without children."
73 run_pwmc
"-S list" $DEVNULL <<EOF
74 ATTR SET _target a b c c
77 test_result
$test_n $e list
"Recursion loop of target that has no target."