summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/data/SPECS/split-transactions--strict-require-1/c.spec14
-rw-r--r--t/data/SPECS/split-transactions--strict-require-1/d1.spec14
-rw-r--r--t/data/SPECS/split-transactions--strict-require-1/d2.spec13
-rw-r--r--t/data/SPECS/split-transactions--strict-require-2/d1.spec13
-rw-r--r--t/data/SPECS/split-transactions--strict-require-2/d2.spec14
-rw-r--r--t/superuser--split-transactions--strict-require.t28
6 files changed, 91 insertions, 5 deletions
diff --git a/t/data/SPECS/split-transactions--strict-require-1/c.spec b/t/data/SPECS/split-transactions--strict-require-1/c.spec
new file mode 100644
index 00000000..3331a997
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-1/c.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: c
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: d
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--strict-require-1/d1.spec b/t/data/SPECS/split-transactions--strict-require-1/d1.spec
new file mode 100644
index 00000000..315d23e2
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-1/d1.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: d1
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: d
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--strict-require-1/d2.spec b/t/data/SPECS/split-transactions--strict-require-1/d2.spec
new file mode 100644
index 00000000..02a66360
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-1/d2.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: d2
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--strict-require-2/d1.spec b/t/data/SPECS/split-transactions--strict-require-2/d1.spec
new file mode 100644
index 00000000..ff13b4a7
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-2/d1.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: d1
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--strict-require-2/d2.spec b/t/data/SPECS/split-transactions--strict-require-2/d2.spec
new file mode 100644
index 00000000..2e36fa7a
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-2/d2.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: d2
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: d
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/superuser--split-transactions--strict-require.t b/t/superuser--split-transactions--strict-require.t
index f1493857..9fa39dc3 100644
--- a/t/superuser--split-transactions--strict-require.t
+++ b/t/superuser--split-transactions--strict-require.t
@@ -3,6 +3,9 @@
# a-1 requires b-1
# a-2 requires b-2
#
+# c requires d
+# d1-1 provides d, but not d1-2
+# d2-2 provides d, but not d2-1
use strict;
use lib '.', 't';
use helper;
@@ -15,13 +18,18 @@ my $name = 'split-transactions--strict-require';
urpmi_addmedia("$name-1 $::pwd/media/$name-1");
urpmi_addmedia("$name-2 $::pwd/media/$name-2");
-test('--split-length 0 b');
-test('--split-level 1 b');
+#- below need the promotion of "a-2" (upgraded from "a-1") to work
+test_ab('--split-length 0 b');
+test_ab('--split-level 1 b');
-test('--split-length 0 --auto-select');
-test('--split-level 1 --auto-select');
+test_ab('--split-length 0 --auto-select');
+test_ab('--split-level 1 --auto-select');
-sub test {
+#- below need the promotion of "d2" (new installed package) to work
+test_cd('--split-length 0 d1');
+test_cd('--split-level 1 d1');
+
+sub test_ab {
my ($para) = @_;
urpmi("--media $name-1 --auto a b");
@@ -30,3 +38,13 @@ sub test {
urpmi("--media $name-2 --auto $para");
check_installed_fullnames_and_remove('a-2-1', 'b-2-1');
}
+
+sub test_cd {
+ my ($para) = @_;
+
+ urpmi("--media $name-1 --auto c");
+ check_installed_names('c', 'd1');
+
+ urpmi("--media $name-2 --auto $para");
+ check_installed_fullnames_and_remove('c-1-1', 'd1-2-1', 'd2-2-1');
+}