diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-25 09:30:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-25 09:30:32 +0000 |
commit | a1b3f72f35afe3672b7f1fec1ba862120283f44a (patch) | |
tree | 052750c98e159d6222d8c16580b55b8121702903 | |
parent | 85d0b5ca0090c0ebd5b8f957fb6cf53341f3b3bb (diff) | |
download | urpmi-a1b3f72f35afe3672b7f1fec1ba862120283f44a.tar urpmi-a1b3f72f35afe3672b7f1fec1ba862120283f44a.tar.gz urpmi-a1b3f72f35afe3672b7f1fec1ba862120283f44a.tar.bz2 urpmi-a1b3f72f35afe3672b7f1fec1ba862120283f44a.tar.xz urpmi-a1b3f72f35afe3672b7f1fec1ba862120283f44a.zip |
add a test case for "sort choices on virtual package by provided version (#12645)"
-rw-r--r-- | MANIFEST | 8 | ||||
-rw-r--r-- | t/data/SPECS/best-versioned-provide/a1.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/best-versioned-provide/a_cc.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/best-versioned-provide/a_dd.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/best-versioned-provide/a_ee.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/best-versioned-provide/b1.spec | 16 | ||||
-rw-r--r-- | t/data/SPECS/best-versioned-provide/b2.spec | 16 | ||||
-rw-r--r-- | t/data/SPECS/best-versioned-provide/b3.spec | 16 | ||||
-rw-r--r-- | t/superuser--best-versioned-provide.t | 39 |
9 files changed, 151 insertions, 0 deletions
@@ -111,6 +111,13 @@ t/data/SPECS/arch_to_noarch_1.spec t/data/SPECS/arch_to_noarch_2.spec t/data/SPECS/arch_to_noarch_3.spec t/data/SPECS/arch_to_noarch_4.spec +t/data/SPECS/best-versioned-provide/a1.spec +t/data/SPECS/best-versioned-provide/a_cc.spec +t/data/SPECS/best-versioned-provide/a_dd.spec +t/data/SPECS/best-versioned-provide/a_ee.spec +t/data/SPECS/best-versioned-provide/b1.spec +t/data/SPECS/best-versioned-provide/b2.spec +t/data/SPECS/best-versioned-provide/b3.spec t/data/SPECS/buildroot_BuildRoot.spec t/data/SPECS/buildroot_default.spec t/data/SPECS/buildroot_define.spec @@ -244,6 +251,7 @@ t/README t/simple-httpd t/superuser--addmedia.t t/superuser--arch_to_noarch.t +t/superuser--best-versioned-provide.t t/superuser--buggy-rpms.t t/superuser--exclude.t t/superuser--file-conflicts.t diff --git a/t/data/SPECS/best-versioned-provide/a1.spec b/t/data/SPECS/best-versioned-provide/a1.spec new file mode 100644 index 00000000..8ac191ae --- /dev/null +++ b/t/data/SPECS/best-versioned-provide/a1.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a1 +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: cc +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/best-versioned-provide/a_cc.spec b/t/data/SPECS/best-versioned-provide/a_cc.spec new file mode 100644 index 00000000..dd55a9d8 --- /dev/null +++ b/t/data/SPECS/best-versioned-provide/a_cc.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a_cc +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: cc +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/best-versioned-provide/a_dd.spec b/t/data/SPECS/best-versioned-provide/a_dd.spec new file mode 100644 index 00000000..fa7640f2 --- /dev/null +++ b/t/data/SPECS/best-versioned-provide/a_dd.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a_dd +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: dd +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/best-versioned-provide/a_ee.spec b/t/data/SPECS/best-versioned-provide/a_ee.spec new file mode 100644 index 00000000..17eaec22 --- /dev/null +++ b/t/data/SPECS/best-versioned-provide/a_ee.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a_ee +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: ee +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/best-versioned-provide/b1.spec b/t/data/SPECS/best-versioned-provide/b1.spec new file mode 100644 index 00000000..01612ea3 --- /dev/null +++ b/t/data/SPECS/best-versioned-provide/b1.spec @@ -0,0 +1,16 @@ +Summary: x +Name: b1 +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Provides: cc = 1 +Provides: dd = 2 +Provides: ee = 3 +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/best-versioned-provide/b2.spec b/t/data/SPECS/best-versioned-provide/b2.spec new file mode 100644 index 00000000..78e96540 --- /dev/null +++ b/t/data/SPECS/best-versioned-provide/b2.spec @@ -0,0 +1,16 @@ +Summary: x +Name: b2 +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Provides: cc = 2 +Provides: dd = 3 +Provides: ee = 1 +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/best-versioned-provide/b3.spec b/t/data/SPECS/best-versioned-provide/b3.spec new file mode 100644 index 00000000..e6aea576 --- /dev/null +++ b/t/data/SPECS/best-versioned-provide/b3.spec @@ -0,0 +1,16 @@ +Summary: x +Name: b3 +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Provides: cc = 3 +Provides: dd = 1 +Provides: ee = 2 +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/superuser--best-versioned-provide.t b/t/superuser--best-versioned-provide.t new file mode 100644 index 00000000..a11a9df1 --- /dev/null +++ b/t/superuser--best-versioned-provide.t @@ -0,0 +1,39 @@ +#!/usr/bin/perl + +# a_cc requires cc +# a_dd requires dd +# a_ee requires ee +# +# b1 provides cc = 1, dd = 2, ee = 3 +# b2 provides cc = 2, dd = 3, ee = 1 +# b3 provides cc = 3, dd = 1, ee = 2 +# +# so a_cc should require b3 +# a_dd should require b2 +# a_ee should require b1 +# +# (cf mdvbz #12645) +# +use strict; +use lib '.', 't'; +use helper; +use Expect; +use urpm::util; +use Test::More 'no_plan'; + +need_root_and_prepare(); + +my $medium_name = 'best-versioned-provide'; + +urpmi_addmedia("$medium_name $::pwd/media/$medium_name"); + +test('a_cc', 'b3'); +test('a_dd', 'b2'); +test('a_ee', 'b1'); + +sub test { + my ($to_install, $should_be_prefered) = @_; + + urpmi("--auto $to_install"); + check_installed_and_remove($to_install, $should_be_prefered); +} |