tests: xbps-rindex/add: rework some tests to use xbps-query -s rather than -Ro.

This commit is contained in:
Juan RP 2014-10-17 10:08:59 +02:00
parent 1531e26ac0
commit 5c8c7b1172

View File

@ -21,10 +21,12 @@ update_body() {
xbps-rindex -a *.xbps
atf_check_equal $? 0
cd ..
result="$(xbps-query -r root -C empty.conf --repository=some_repo -o \*)"
expected="foo-1.1_1: /file00 (some_repo)"
result="$(xbps-query -C empty.conf --repository=some_repo -s '')"
expected="[-] foo-1.1_1 foo pkg"
rv=0
if [ "$result" != "$expected" ]; then
echo "result: $result"
echo "expected: $expected"
rv=1
fi
atf_check_equal $rv 0
@ -47,10 +49,12 @@ revert_body() {
xbps-rindex -a *.xbps
atf_check_equal $? 0
cd ..
result="$(xbps-query -r root -C empty.conf --repository=some_repo -o \*)"
expected="foo-1.0_1: /file00 (some_repo)"
result="$(xbps-query -C empty.conf --repository=some_repo -s '')"
expected="[-] foo-1.0_1 foo pkg"
rv=0
if [ "$result" != "$expected" ]; then
echo "result: $result"
echo "expected: $expected"
rv=1
fi
atf_check_equal $rv 0