Skip to content

Commit 71c6721

Browse files
committed
tests: staging multiple libraries and clean one to half unstage
1 parent 74bc0c3 commit 71c6721

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

tests/xbps/xbps-rindex/add_test.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,48 @@ stage_resolve_bug_body() {
156156
xbps-query -r ../root -i --repository=$PWD -L
157157
}
158158

159+
atf_test_case stage_stacked
160+
161+
stage_stacked_head() {
162+
atf_set "descr" "xbps-rindex(1) -a: staging multiple libraries and clean one to half unstage"
163+
}
164+
165+
stage_stacked_body() {
166+
mkdir -p repo root pkg
167+
168+
cd repo
169+
atf_check -o ignore -- xbps-create -A noarch -n flac-1.4.3_1 -s "flac pkg" --shlib-provides "libFLAC.so.12" ../pkg
170+
atf_check -o ignore -- xbps-create -A noarch -n ruby-3.3.8_1 -s "ruby pkg" --shlib-provides "libruby.so.3.3" ../pkg
171+
atf_check -o ignore -- xbps-create -A noarch -n A-1.0_1 -s "A pkg" --shlib-requires "libFLAC.so.12" ../pkg
172+
atf_check -o ignore -- xbps-create -A noarch -n B-1.0_1 -s "B pkg" --shlib-requires "libruby.so.3.3" ../pkg
173+
atf_check -e ignore -o ignore -- xbps-rindex -va *.xbps
174+
175+
atf_check -o ignore -- xbps-create -A noarch -n flac-1.5.0_1 -s "flac pkg" --shlib-provides "libFLAC.so.14" ../pkg
176+
atf_check -e ignore -o match:"stage: added \`flac-1\.5\.0_1' \(noarch\)" -- xbps-rindex -va flac-1.5.0_1.noarch.xbps
177+
178+
atf_check -o ignore -- xbps-create -A noarch -n ruby-3.4.5_1 -s "ruby pkg" --shlib-provides "libruby.so.3.4" ../pkg
179+
atf_check -e ignore -o match:"stage: added \`ruby-3\.4\.5_1' \(noarch\)" -- xbps-rindex -va ruby-3.4.5_1.noarch.xbps
180+
181+
# atf_check -o ignore -- xbps-create -A noarch -n A-1.0_2 -s "A pkg" --shlib-requires "libFLAC.so.14" ../pkg
182+
# atf_check -e ignore -o match:"stage: added \`A-1\.0_2' \(noarch\)" -- xbps-rindex -va A-1.0_2.noarch.xbps
183+
184+
rm A-1.0_1.noarch.xbps
185+
atf_check -o match:"index: removed pkg A-1\.0_1" -- xbps-rindex -c .
186+
187+
atf_check -o match:"\(Staged\)" -- xbps-query -r root --repository=. -L
188+
189+
atf_check -o ignore -- xbps-create -A noarch -n C-1.0_1 -s "C pkg" --shlib-requires "libFLAC.so.14" ../pkg
190+
atf_check -o match:"stage: added \`C-1\.0_1' \(noarch\)" -- xbps-rindex -va C-1.0_1.noarch.xbps
191+
192+
atf_check -o ignore -- xbps-create -A noarch -n B-1.0_2 -s "B pkg" --shlib-requires "libruby.so.3.4" ../pkg
193+
atf_check -o match:"index: added \`B-1\.0_2' \(noarch\)" -- xbps-rindex -va B-1.0_2.noarch.xbps
194+
195+
}
196+
159197
atf_init_test_cases() {
160198
atf_add_test_case update
161199
atf_add_test_case revert
162200
atf_add_test_case stage
163201
atf_add_test_case stage_resolve_bug
202+
atf_add_test_case stage_stacked
164203
}

0 commit comments

Comments
 (0)