Skip to content

Commit

Permalink
tests: new test case for updating "unpacked" packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncaen committed Jul 16, 2020
1 parent 1594129 commit 05ff04a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/xbps/xbps-install/behaviour_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,36 @@ update_existent_body() {
atf_check_equal $? 0
}

atf_test_case update_unpacked

update_unpacked_head() {
atf_set "descr" "xbps-install(1): update unpacked pkg"
atf_expect_fail "currently just configures the package"
}

update_unpacked_body() {
mkdir -p some_repo pkg_A
touch pkg_A/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
cd ..
xbps-install -r root -C empty.conf --repository=$PWD/some_repo -yU A
atf_check_equal $? 0
cd some_repo
xbps-create -A noarch -n A-1.0_2 -s "A pkg" ../pkg_A
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
cd ..
set -- $(xbps-install -r root -C empty.conf --repository=$PWD/some_repo -un A)
if [ "$2" != "update" ]; then
atf_fail "'$2' != 'update'"
fi
}

atf_test_case reproducible

reproducible_head() {
Expand Down Expand Up @@ -104,5 +134,6 @@ reproducible_body() {
atf_init_test_cases() {
atf_add_test_case install_existent
atf_add_test_case update_existent
atf_add_test_case update_unpacked
atf_add_test_case reproducible
}

0 comments on commit 05ff04a

Please sign in to comment.