diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-05-31 14:07:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-05-31 14:07:59 +0000 |
commit | 210fb9c922a38df29dcb17d05a0cdf3212994658 (patch) | |
tree | 287302599f0dab873e0b24564622b0611ba6e17e /t/superuser--obsolete-and-provide.t | |
parent | 8de13f3008b9a92747bc33337522e6c85ee60e32 (diff) | |
download | urpmi-210fb9c922a38df29dcb17d05a0cdf3212994658.tar urpmi-210fb9c922a38df29dcb17d05a0cdf3212994658.tar.gz urpmi-210fb9c922a38df29dcb17d05a0cdf3212994658.tar.bz2 urpmi-210fb9c922a38df29dcb17d05a0cdf3212994658.tar.xz urpmi-210fb9c922a38df29dcb17d05a0cdf3212994658.zip |
add a test case for bug #31130 (--auto-select not upgrading pkg "a" providing
"c" because pkg "b" provides a new version of "c")
Diffstat (limited to 't/superuser--obsolete-and-provide.t')
-rw-r--r-- | t/superuser--obsolete-and-provide.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/t/superuser--obsolete-and-provide.t b/t/superuser--obsolete-and-provide.t new file mode 100644 index 00000000..dc45e45e --- /dev/null +++ b/t/superuser--obsolete-and-provide.t @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +use strict; +use lib '.', 't'; +use helper; +use Test::More 'no_plan'; + +my $medium_name = 'obsolete-and-provide'; + +need_root_and_prepare(); + +urpmi_addmedia("$medium_name $::pwd/media/$medium_name"); + +test(sub { urpmi('a'); check_installed_fullnames("a-2-1"); urpme('a') }); +test(sub { urpmi('b'); check_installed_fullnames("a-1-1", "b-3-1"); urpme('a b') }); + +#- the following test fail. "urpmi --auto-select" should do the same as "urpmi a" +#test(sub { urpmi('--auto-select'); check_installed_fullnames("a-2-1"); urpme('a') }); + +sub test { + my ($f) = @_; + system_("rpm --root $::pwd/root -i media/$medium_name/a-1-*.rpm"); + is(`rpm -qa --root $::pwd/root`, "a-1-1\n"); + + $f->(); + check_nothing_installed(); +} |