diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-12-06 11:00:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-12-06 11:00:06 +0000 |
commit | ed654fa31d41be62b134c5300b577b121ce6344f (patch) | |
tree | 7ebb4a6e1399e9819e2083f6abcc44fad287b405 | |
parent | 6d5838c5a7a080f7232d468c204f42bc6079ccbb (diff) | |
download | urpmi-ed654fa31d41be62b134c5300b577b121ce6344f.tar urpmi-ed654fa31d41be62b134c5300b577b121ce6344f.tar.gz urpmi-ed654fa31d41be62b134c5300b577b121ce6344f.tar.bz2 urpmi-ed654fa31d41be62b134c5300b577b121ce6344f.tar.xz urpmi-ed654fa31d41be62b134c5300b577b121ce6344f.zip |
also test urpmi works with that configuration
-rw-r--r-- | t/superuser--addmedia.t | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/t/superuser--addmedia.t b/t/superuser--addmedia.t index d8e31ad3..2a2f1dfe 100644 --- a/t/superuser--addmedia.t +++ b/t/superuser--addmedia.t @@ -10,9 +10,22 @@ need_root_and_prepare(); my $name = 'various'; -try('', { hdlist => undef, synthesis => undef }); -try('--probe-hdlist', { hdlist => "hdlist.$name.cz", synthesis => undef }); -try('--probe-synthesis', { hdlist => undef, synthesis => 1 }); +my @fields = qw(hdlist synthesis with_hdlist media_info_dir); +try('', { media_info_dir => 'media_info' }); + +try('--probe-hdlist', + { hdlist => "hdlist.$name.cz", media_info_dir => 'media_info' }); +try('with media_info/hdlist.cz', + { hdlist => "hdlist.$name.cz", media_info_dir => 'media_info' }); +try("with ../media_info/hdlist_$name.cz", + { hdlist => "hdlist.$name.cz", with_hdlist => "../media_info/hdlist_$name.cz" }); + +try('--probe-synthesis', + { synthesis => 1, media_info_dir => 'media_info' }); +try('with media_info/synthesis.hdlist.cz', + { synthesis => 1, media_info_dir => 'media_info' }); +try("with ../media_info/synthesis.hdlist_$name.cz", + { synthesis => 1, with_hdlist => "../media_info/synthesis.hdlist_$name.cz" }); sub try { my ($options, $want) = @_; @@ -20,8 +33,11 @@ sub try { my $config = urpm::cfg::load_config("root/etc/urpmi/urpmi.cfg"); my ($medium) = @{$config->{media}}; ok($medium); - foreach my $field (keys %$want) { - is($medium->{$field}, $want->{$field}); + foreach my $field (@fields) { + is($medium->{$field}, $want->{$field}, $field); } + urpmi($name); + is(`rpm -qa --root $::pwd/root`, "$name-1-1\n"); + urpme($name); urpmi_removemedia($name); } |