summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/data/SPECS/suggests/c2.spec14
-rw-r--r--t/superuser--suggests.t21
2 files changed, 35 insertions, 0 deletions
diff --git a/t/data/SPECS/suggests/c2.spec b/t/data/SPECS/suggests/c2.spec
new file mode 100644
index 00000000..861d0688
--- /dev/null
+++ b/t/data/SPECS/suggests/c2.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: c2
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: cc
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/superuser--suggests.t b/t/superuser--suggests.t
index c81d71bd..9517ca8a 100644
--- a/t/superuser--suggests.t
+++ b/t/superuser--suggests.t
@@ -8,6 +8,7 @@
# b suggests suggested_b
# c suggests cc
# cc requires b
+# c2 requires cc
#
# with-invalid suggests invalid
#
@@ -23,6 +24,8 @@ my $medium_name = 'suggests';
urpmi_addmedia("$medium_name $::pwd/media/$medium_name");
+test_d();
+exit;
test_b();
test_c();
test_invalid();
@@ -83,3 +86,21 @@ sub test_upgrade {
urpmi(" --auto a-3");
check_installed_and_remove('a', 'suggested_c');
}
+
+sub test_d {
+ my @common = ('b', 'bb', 'suggested_b');
+
+ urpmi("--auto c");
+ check_installed_names('c', 'cc', @common);
+ system_("rpm --root $::pwd/root -e cc");
+ check_installed_and_remove('c', @common);
+
+ foreach my $names ('c2', 'c2 c') { # ERROR: 'c c2' should work (#34342)
+ my @names = split(' ', $names);
+ urpmi("--auto $_") foreach @names;
+ check_installed_names(@names, 'cc', @common);
+ system_should_fail("rpm --root $::pwd/root -e cc");
+ check_installed_and_remove(@names, 'cc', @common);
+ }
+}
+