summaryrefslogtreecommitdiffstats
path: root/t/superuser--split-transactions--promote.t
diff options
context:
space:
mode:
Diffstat (limited to 't/superuser--split-transactions--promote.t')
-rw-r--r--t/superuser--split-transactions--promote.t38
1 files changed, 29 insertions, 9 deletions
diff --git a/t/superuser--split-transactions--promote.t b/t/superuser--split-transactions--promote.t
index d13ed470..bbee7f5b 100644
--- a/t/superuser--split-transactions--promote.t
+++ b/t/superuser--split-transactions--promote.t
@@ -6,6 +6,9 @@
# c requires d
# d1-1 provides d, but not d1-2
# d2-2 provides d, but not d2-1
+#
+# e-2 conflicts with f-1
+#
use strict;
use lib '.', 't';
use helper;
@@ -14,20 +17,27 @@ use Test::More 'no_plan';
need_root_and_prepare();
-my $name = 'split-transactions--strict-require';
+my $name = 'split-transactions--promote';
urpmi_addmedia("$name-1 $::pwd/media/$name-1");
urpmi_addmedia("$name-2 $::pwd/media/$name-2");
-#- below need the promotion of "a-2" (upgraded from "a-1")
-test_ab('--split-length 0 b');
-test_ab('--split-level 1 b');
+test('--split-length 0');
+test('--split-level 1');
+
+sub test {
+ my ($split) = @_;
-test_ab('--split-length 0 --auto-select');
-test_ab('--split-level 1 --auto-select');
+ test_ab("$split --auto-select");
-#- below need the promotion of "d2" (new package to install)
-test_cd('--split-length 0 d1');
-test_cd('--split-level 1 d1');
+ #- below need the promotion of "a-2" (upgraded from "a-1") to work
+ test_ab("$split b");
+
+ #- below need the promotion of "d2" (new installed package) to work
+ test_cd("$split d1");
+
+ #- below need the promotion of "f-2" (upgraded from "f-1") to work
+ test_ef("$split e");
+}
sub test_ab {
my ($para) = @_;
@@ -48,3 +58,13 @@ sub test_cd {
urpmi("--media $name-2 --auto $para");
check_installed_fullnames_and_remove('c-1-1', 'd1-2-1', 'd2-2-1');
}
+
+sub test_ef {
+ my ($para) = @_;
+
+ urpmi("--media $name-1 --auto e f");
+ check_installed_names('f', 'e');
+
+ urpmi("--media $name-2 --auto $para");
+ check_installed_fullnames_and_remove('e-2-1', 'f-2-1');
+}