From 26b7864973b4d98df98945554cf0d9446a4981c5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 25 Jan 2020 10:15:35 +0100 Subject: [PATCH] tests/hold: update hold_shlibs test case with exp behaviour. --- tests/xbps/libxbps/shell/hold_test.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/xbps/libxbps/shell/hold_test.sh b/tests/xbps/libxbps/shell/hold_test.sh index f578406c..f5627a7a 100644 --- a/tests/xbps/libxbps/shell/hold_test.sh +++ b/tests/xbps/libxbps/shell/hold_test.sh @@ -69,8 +69,9 @@ hold_shlibs_body() { atf_check_equal $? 0 cd .. + # returns ENOEXEC because sway can't be upgraded xbps-install -r root --repo=repo -yud - atf_check_equal $? 0 + atf_check_equal $? 8 out=$(xbps-query -r root -p pkgver sway) atf_check_equal "$out" "sway-1.2_1" @@ -80,6 +81,21 @@ hold_shlibs_body() { xbps-pkgdb -r root -a atf_check_equal $? 0 + + # unhold to verify + xbps-pkgdb -r root -m unhold sway + + xbps-install -r root --repo=repo -yud + atf_check_equal $? 0 + + out=$(xbps-query -r root -p pkgver sway) + atf_check_equal "$out" "sway-1.4_1" + + out=$(xbps-query -r root -p pkgver wlroots) + atf_check_equal "$out" "wlroots-0.10.0_1" + + xbps-pkgdb -r root -a + atf_check_equal $? 0 } atf_init_test_cases() {