diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | t/superuser--failing-scriptlets.t | 12 |
2 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,5 @@ +- adapt testsuite to rpm-4.13.0~rc2 + Version 8.104 - 15 October 2016 - fix more Getopt::Long breakages (drop the "gnu_compat" option) diff --git a/t/superuser--failing-scriptlets.t b/t/superuser--failing-scriptlets.t index 1f0f733f..80c81146 100644 --- a/t/superuser--failing-scriptlets.t +++ b/t/superuser--failing-scriptlets.t @@ -12,7 +12,7 @@ need_root_and_prepare(); test_install_rpm_fail('pre'); test_install_rpm_fail('pretrans'); test_install_rpm('post'); -test_install_rpm('preun'); +test_install_rpm_but_uninstall_fail('preun'); test_install_rpm('postun'); test_install_rpm('posttrans'); @@ -39,6 +39,16 @@ sub test_install_rpm_fail { check_installed_fullnames_and_remove("sh-1-1"); } +sub test_install_rpm_but_uninstall_fail { + my ($name) = @_; + test_install_rpm_no_remove('sh'); + system_("rpm --root $::pwd/root -i media/$medium_name/$name-*.rpm"); + check_installed_fullnames("$name-1-1", "sh-1-1"); + system_should_fail("rpm --root $::pwd/root -e $name"); + system_("rpm --root $::pwd/root -e $name --nopreun"); + check_installed_fullnames_and_remove("sh-1-1"); +} + sub test_install_upgrade_rpm { my ($name) = @_; |