summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-10-02 09:47:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-10-02 09:47:49 +0000
commitb8f0bf2c8511923aa38fc66124549bab81f40a89 (patch)
tree393a46a088b0c1b4b146c8349d4d523815b23ac4 /t
parent094bf9ea8184ed1d33e95ad6cd8c9e27bc488e34 (diff)
downloadurpmi-b8f0bf2c8511923aa38fc66124549bab81f40a89.tar
urpmi-b8f0bf2c8511923aa38fc66124549bab81f40a89.tar.gz
urpmi-b8f0bf2c8511923aa38fc66124549bab81f40a89.tar.bz2
urpmi-b8f0bf2c8511923aa38fc66124549bab81f40a89.tar.xz
urpmi-b8f0bf2c8511923aa38fc66124549bab81f40a89.zip
add a test showing rpm failure (for #34342)
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);
+ }
+}
+