From 389b9f2d3a0995ac14c93ca7e98729cabcdb8df4 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 28 Jul 2009 13:12:03 +0000 Subject: add testcase for bug #52153 Patch by Anssi Hannula --- t/superuser--handle-conflict-deps2.t | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/t/superuser--handle-conflict-deps2.t b/t/superuser--handle-conflict-deps2.t index 1b859c8b..a59c35f7 100644 --- a/t/superuser--handle-conflict-deps2.t +++ b/t/superuser--handle-conflict-deps2.t @@ -22,10 +22,12 @@ 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']); +# 'c-2','d2-2' is also a valid result; both wanted pkgs can't be installed, +# so urpmi can arbitrarily drop one (after confirming with user, of course) +test(['d1-1', 'c-1'], ['c-2', 'd1-2'], ['c-1', 'd1-2']); -#test(['a1-1', 'b-1'], ['b-2', 'a1-2'], ['b-2', 'a2-2']); +# 'a1-2','b-1' is also a valid result +test(['a1-1', 'b-1'], ['b-2', 'a1-2'], ['b-2', 'a2-2']); sub test { @@ -34,6 +36,10 @@ sub test { urpmi("--auto @$first"); check_installed_fullnames(map { "$_-1" } @$first); + # test for bug #52153 + system_should_fail("echo n | " . urpmi_cmd() . " @$wanted"); + check_installed_fullnames(map { "$_-1" } @$first); + urpmi("--auto @$wanted"); - check_installed_fullnames(map { "$_-1" } @$result); + check_installed_fullnames_and_remove(map { "$_-1" } @$result); } -- cgit v1.2.1