summaryrefslogtreecommitdiffstats
path: root/t/superuser--orphans.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-06 10:49:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-06 10:49:20 +0000
commit22ee6c9e14054920ccb3e2ab97627cc5a21575bf (patch)
tree5b620f8d29ec0b754af757146fa2e68fe0d6d703 /t/superuser--orphans.t
parentaf9e0701a235db1e683f4b5ae87b9ef9374cb3f7 (diff)
downloadurpmi-22ee6c9e14054920ccb3e2ab97627cc5a21575bf.tar
urpmi-22ee6c9e14054920ccb3e2ab97627cc5a21575bf.tar.gz
urpmi-22ee6c9e14054920ccb3e2ab97627cc5a21575bf.tar.bz2
urpmi-22ee6c9e14054920ccb3e2ab97627cc5a21575bf.tar.xz
urpmi-22ee6c9e14054920ccb3e2ab97627cc5a21575bf.zip
add a test case which fails: test_auto_select_urpme(['g', 'gg'], 'g', 'gg')
Diffstat (limited to 't/superuser--orphans.t')
-rw-r--r--t/superuser--orphans.t12
1 files changed, 12 insertions, 0 deletions
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);