tests/xbps-alternatives: extend register_one_relative test case.
This commit is contained in:
parent
2d9630581e
commit
e3a0164355
@ -3,7 +3,7 @@
|
|||||||
atf_test_case register_one
|
atf_test_case register_one
|
||||||
|
|
||||||
register_one_head() {
|
register_one_head() {
|
||||||
atf_set "descr" "xbps-alternatives: register one pkg wth an alternatives group"
|
atf_set "descr" "xbps-alternatives: register one pkg with an alternatives group"
|
||||||
}
|
}
|
||||||
register_one_body() {
|
register_one_body() {
|
||||||
mkdir -p repo pkg_A/usr/bin
|
mkdir -p repo pkg_A/usr/bin
|
||||||
@ -31,13 +31,13 @@ register_one_body() {
|
|||||||
atf_test_case register_one_relative
|
atf_test_case register_one_relative
|
||||||
|
|
||||||
register_one_relative_head() {
|
register_one_relative_head() {
|
||||||
atf_set "descr" "xbps-alternatives: register one pkg wth an alternatives group that has a relative path"
|
atf_set "descr" "xbps-alternatives: register one pkg with an alternatives group that has a relative path"
|
||||||
}
|
}
|
||||||
register_one_relative_body() {
|
register_one_relative_body() {
|
||||||
mkdir -p repo pkg_A/usr/bin
|
mkdir -p repo pkg_A/usr/bin
|
||||||
touch pkg_A/usr/bin/fileA
|
touch pkg_A/usr/bin/fileA pkg_A/usr/bin/fileB
|
||||||
cd repo
|
cd repo
|
||||||
xbps-create -A noarch -n A-1.1_1 -s "A pkg" --alternatives "file:../file:/usr/bin/fileA" ../pkg_A
|
xbps-create -A noarch -n A-1.1_1 -s "A pkg" --alternatives "file:../file:/usr/bin/fileA file2:file2:/usr/bin/fileB" ../pkg_A
|
||||||
atf_check_equal $? 0
|
atf_check_equal $? 0
|
||||||
xbps-rindex -d -a $PWD/*.xbps
|
xbps-rindex -d -a $PWD/*.xbps
|
||||||
atf_check_equal $? 0
|
atf_check_equal $? 0
|
||||||
@ -54,6 +54,15 @@ register_one_relative_body() {
|
|||||||
echo "A lnk: $lnk"
|
echo "A lnk: $lnk"
|
||||||
fi
|
fi
|
||||||
atf_check_equal $rv 0
|
atf_check_equal $rv 0
|
||||||
|
rv=1
|
||||||
|
if [ -e root/usr/bin/fileB ]; then
|
||||||
|
lnk=$(readlink root/usr/bin/file2)
|
||||||
|
if [ "$lnk" = "/usr/bin/fileB" ]; then
|
||||||
|
rv=0
|
||||||
|
fi
|
||||||
|
echo "A lnk: $lnk"
|
||||||
|
fi
|
||||||
|
atf_check_equal $rv 0
|
||||||
}
|
}
|
||||||
|
|
||||||
atf_test_case register_dups
|
atf_test_case register_dups
|
||||||
|
Loading…
x
Reference in New Issue
Block a user