Files
xbps/tests/xbps/xbps-install/behaviour_tests.sh
2014-11-06 11:21:32 +01:00

38 lines
987 B
Bash

#! /usr/bin/env atf-sh
atf_test_case install_existent
install_existent_head() {
atf_set "descr" "xbps-install(8): install multiple existent pkgs (issue #53)"
}
install_existent_body() {
mkdir -p some_repo pkg_A pkg_B
touch pkg_A/file00
touch pkg_B/file00
cd some_repo
xbps-create -A noarch -n A-1.0_1 -s "A pkg" ../pkg_A
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
xbps-create -A noarch -n B-1.1_1 -s "B pkg" ../pkg_B
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
cd ..
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A
atf_check_equal $? 0
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A B
atf_check_equal $? 0
rm -r root
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A
atf_check_equal $? 0
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y B A
atf_check_equal $? 0
}
atf_init_test_cases() {
atf_add_test_case install_existent
}