summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/data/SPECS/split-transactions--promote-1/e.spec13
-rw-r--r--t/data/SPECS/split-transactions--promote-1/f.spec13
-rw-r--r--t/data/SPECS/split-transactions--promote-2/e.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-2/f.spec13
-rw-r--r--t/superuser--split-transactions--promote.t38
5 files changed, 82 insertions, 9 deletions
diff --git a/t/data/SPECS/split-transactions--promote-1/e.spec b/t/data/SPECS/split-transactions--promote-1/e.spec
new file mode 100644
index 00000000..fc55824e
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/e.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: e
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-1/f.spec b/t/data/SPECS/split-transactions--promote-1/f.spec
new file mode 100644
index 00000000..33b16b57
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/f.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: f
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/e.spec b/t/data/SPECS/split-transactions--promote-2/e.spec
new file mode 100644
index 00000000..c3252dce
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/e.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: e
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+Conflicts: f <= 1
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/f.spec b/t/data/SPECS/split-transactions--promote-2/f.spec
new file mode 100644
index 00000000..9b6d3347
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/f.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: f
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
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');
+}