From 22ee6c9e14054920ccb3e2ab97627cc5a21575bf Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 6 Sep 2008 10:49:20 +0000 Subject: add a test case which fails: test_auto_select_urpme(['g', 'gg'], 'g', 'gg') --- t/superuser--orphans.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/t/superuser--orphans.t b/t/superuser--orphans.t index 29e87f97..c713d2d6 100644 --- a/t/superuser--orphans.t +++ b/t/superuser--orphans.t @@ -56,6 +56,9 @@ test_auto_select_both('t', 'tt1', 't-2 tt2-2', 'tt1-1'); test_auto_select(['r', 'rr1'], 'r rr1 rr2', 'r-2 rr1-1', 'rr2-1'); #test_auto_select(['s ss1'], 's ss1 ss2', 's-2 ss1-1', 'ss2-1'); # this fails, but that's ok +test_auto_select_urpme(['g'], 'g', ''); +test_auto_select_urpme(['g', 'gg'], 'g', 'gg'); + sub add_version1 { map { "$_-1-1" } split(' ', $_[0] || '') } sub add_version2 { map { "$_-2-1" } split(' ', $_[0] || '') } sub add_release { map { "$_-1" } split(' ', $_[0] || '') } @@ -123,6 +126,15 @@ sub test_auto_select_raw_auto_orphans { check_installed_fullnames_and_remove(split ' ', $wanted_v2); } +sub test_auto_select_urpme { + my ($req_v1, $remove_v2, $remaining_v2) = @_; + print "# test_auto_select_urpme(@$req_v1, $remove_v2, $remaining_v2)\n"; + urpmi("--media $name-1 --auto $_") foreach @$req_v1; + urpmi("--media $name-2 --auto --auto-select"); + urpme("--auto --auto-orphans $remove_v2"); + check_installed_fullnames_and_remove(split ' ', $remaining_v2); +} + sub run_and_get_suggested_orphans { my ($cmd, @wanted) = @_; my $s = run_urpm_cmd($cmd); -- cgit v1.2.1