3 # Tests for the XPATH protocol command.
8 .
$AM_SRCDIR/import-common.sh
12 cat >$OUTDIR/config
<< EOF
17 passphrase_file=$WDIR/passphrase.key
19 mv -f data
/list data
/xpath || bail_out
"Could not move data/list."
24 run_pwmc
"xpath" $DEVNULL <<EOF
27 test_failure
$test_n $?
536871048 "Fail due to no matching elements."
31 run_pwmc
"xpath" $DEVNULL <<EOF
34 test_failure
$test_n $?
536871001 "Fail due to invalid expression syntax."
38 run_pwmc
"xpath" >result
$DEVNULL <<EOF
39 XPATH //element[@_name="a"]
41 test_result
$test_n $? xpath
"Expression result."
45 run_pwmc
"-S xpath" $DEVNULL <<EOF
46 XPATH /pwmd/element[@_name="a"] new value
49 test_result
$test_n $? xpath
"Setting of element content."