summaryrefslogtreecommitdiffstats
path: root/t/superuser--split-transactions--conflict.t
diff options
context:
space:
mode:
Diffstat (limited to 't/superuser--split-transactions--conflict.t')
-rw-r--r--t/superuser--split-transactions--conflict.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/superuser--split-transactions--conflict.t b/t/superuser--split-transactions--conflict.t
new file mode 100644
index 00000000..ec88b664
--- /dev/null
+++ b/t/superuser--split-transactions--conflict.t
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+# a requires b
+# b-1 requires c
+# b-2 requires d
+# d conflicts with c
+#
+use strict;
+use lib '.', 't';
+use helper;
+use urpm::util;
+use Test::More 'no_plan';
+
+need_root_and_prepare();
+
+my $name = 'split-transactions--conflict';
+urpmi_addmedia("$name-1 $::pwd/media/$name-1");
+urpmi_addmedia("$name-2 $::pwd/media/$name-2");
+
+test('--split-length 0');
+test('--split-level 1');
+
+sub test {
+ my ($option) = @_;
+
+ urpmi("--media $name-1 --auto a b c");
+ check_installed_fullnames('a-1-1', 'b-1-1', 'c-1-1');
+
+ urpmi("--media $name-2 $option --auto --auto-select");
+ check_installed_fullnames_and_remove('a-1-1', 'b-2-1', 'd-1-1');
+}