File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,44 @@ script_action_body() {
177177 atf_check_equal $? 0
178178 grep " ^remove 1.0_2 purge A 1.0_2 no no" out
179179 atf_check_equal $? 0
180+
181+ # reinstall run new INSTALL script.
182+ create_script_stdout " install old 2.0_1" pkg_A/INSTALL
183+ create_script_stdout " remove old 2.0_1" pkg_A/REMOVE
184+ cd some_repo
185+ xbps-create -A noarch -n A-2.0_1 -s " A pkg" ../pkg_A
186+ atf_check_equal $? 0
187+ xbps-rindex -d -a $PWD /* .xbps
188+ atf_check_equal $? 0
189+ cd ..
190+
191+ xbps-install -C empty.conf -r root --repository=$PWD /some_repo -y A > out
192+ atf_check_equal $? 0
193+
194+ create_script_stdout " install new 2.0_1" pkg_A/INSTALL
195+ create_script_stdout " remove new 2.0_1" pkg_A/REMOVE
196+ cd some_repo
197+ xbps-create -A noarch -n A-2.0_1 -s " A pkg" ../pkg_A
198+ atf_check_equal $? 0
199+ xbps-rindex -d -fa $PWD /* .xbps
200+ atf_check_equal $? 0
201+ cd ..
202+
203+ xbps-install -C empty.conf -r root --repository=$PWD /some_repo -yf A > out
204+ atf_check_equal $? 0
205+
206+ cat out>&2
207+ atf_check_equal $? 0
208+ grep " ^remove old 2.0_1 pre A 2.0_1 no no" out
209+ atf_check_equal $? 0
210+ grep " ^remove old 2.0_1 post A 2.0_1 no no" out
211+ atf_check_equal $? 0
212+ grep " ^remove old 2.0_1 purge A 2.0_1 no no" out
213+ atf_check_equal $? 0
214+ grep " ^install new 2.0_1 pre A 2.0_1 no no" out
215+ atf_check_equal $? 0
216+ grep " ^install new 2.0_1 post A 2.0_1 no no" out
217+ atf_check_equal $? 0
180218}
181219
182220atf_init_test_cases () {
You can’t perform that action at this time.
0 commit comments