summaryrefslogtreecommitdiffstats
path: root/t/superuser--handle-conflict-deps2.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-04-03 16:07:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-04-03 16:07:10 +0000
commit591d7db0085822313892144b32e1d55f840007a4 (patch)
tree37805fb419715da1e3bc3061272fa67fd90e91f8 /t/superuser--handle-conflict-deps2.t
parentde25ad034d6be60e3c6a00a4b1bfe787ec83cf9b (diff)
downloadurpmi-591d7db0085822313892144b32e1d55f840007a4.tar
urpmi-591d7db0085822313892144b32e1d55f840007a4.tar.gz
urpmi-591d7db0085822313892144b32e1d55f840007a4.tar.bz2
urpmi-591d7db0085822313892144b32e1d55f840007a4.tar.xz
urpmi-591d7db0085822313892144b32e1d55f840007a4.zip
add a test case for something that currently fails
Diffstat (limited to 't/superuser--handle-conflict-deps2.t')
-rw-r--r--t/superuser--handle-conflict-deps2.t35
1 files changed, 35 insertions, 0 deletions
diff --git a/t/superuser--handle-conflict-deps2.t b/t/superuser--handle-conflict-deps2.t
new file mode 100644
index 00000000..3a87d7e8
--- /dev/null
+++ b/t/superuser--handle-conflict-deps2.t
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+# a1-1 upgrades to a1-2
+# b-1 upgrades to b-2 which requires a2
+# a2 conflicts with a1
+#
+# d & a is the same as a & b
+# (needed to ensure both ordering works)
+#
+use strict;
+use lib '.', 't';
+use helper;
+use urpm::util;
+use Test::More 'no_plan';
+
+need_root_and_prepare();
+
+my $name = 'handle-conflict-deps2';
+urpmi_addmedia("$name $::pwd/media/$name");
+
+# TODO: it should be an error since the wanted pkgs can't be fulfilled
+test(['d1-1', 'c-1'], ['c-2', 'd1-2'], ['c-2', 'd2-2']);
+
+#test(['a1-1', 'b-1'], ['b-2', 'a1-2'], ['b-2', 'a2-2']);
+
+
+sub test {
+ my ($first, $wanted, $result) = @_;
+
+ urpmi("--auto @$first");
+ check_installed_fullnames(map { "$_-1" } @$first);
+
+ urpmi("--auto @$wanted");
+ check_installed_fullnames(map { "$_-1" } @$result);
+}