summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-30 10:14:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-30 10:14:46 +0000
commit3ccf4fa6a9e2e17fe5bd8bf1b23500cae7379a1e (patch)
tree7db1a2601d861c339d3fdb65a16f7a92a355f7d8 /t
parent9571638b8f4070a263159530c079e2818fd200ba (diff)
downloadurpmi-3ccf4fa6a9e2e17fe5bd8bf1b23500cae7379a1e.tar
urpmi-3ccf4fa6a9e2e17fe5bd8bf1b23500cae7379a1e.tar.gz
urpmi-3ccf4fa6a9e2e17fe5bd8bf1b23500cae7379a1e.tar.bz2
urpmi-3ccf4fa6a9e2e17fe5bd8bf1b23500cae7379a1e.tar.xz
urpmi-3ccf4fa6a9e2e17fe5bd8bf1b23500cae7379a1e.zip
- urpmi:
o fix regression introduced in 4.10.15: "urpmi --force valid invalid" should warn about "invalid" but still install "valid"
Diffstat (limited to 't')
-rw-r--r--t/helper.pm6
-rw-r--r--t/superuser--file-conflicts.t5
-rw-r--r--t/superuser--media_info_dir.t16
3 files changed, 21 insertions, 6 deletions
diff --git a/t/helper.pm b/t/helper.pm
index 210aadd6..58c1e8c4 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -5,7 +5,7 @@ use base 'Exporter';
our @EXPORT = qw(need_root_and_prepare
start_httpd httpd_port
urpmi_addmedia urpmi_removemedia urpmi_update
- urpm_cmd urpmi_cmd urpmi urpme
+ urpm_cmd urpmi_cmd urpmi test_urpmi_fail urpme
urpmi_cfg set_urpmi_cfg_global_options
system_ system_should_fail
rpm_is_jbj_version
@@ -71,6 +71,10 @@ sub urpmi {
my ($para) = @_;
system_(urpmi_cmd() . " --ignoresize $urpmi_debug_opt $para");
}
+sub test_urpmi_fail {
+ my ($para) = @_;
+ system_should_fail(urpmi_cmd() . " $para");
+}
sub urpme {
my ($para) = @_;
system_(urpm_cmd('urpme') . " $para");
diff --git a/t/superuser--file-conflicts.t b/t/superuser--file-conflicts.t
index d3fcf03b..9edf794d 100644
--- a/t/superuser--file-conflicts.t
+++ b/t/superuser--file-conflicts.t
@@ -153,11 +153,6 @@ sub test_rpm_i_fail {
my $rpms = join(' ', map { "media/$medium_name/$_-*.rpm" } @rpms);
system_should_fail("rpm --root $::pwd/root -i $rpms");
}
-sub test_urpmi_fail {
- my ($rpms) = @_;
- system_should_fail(urpmi_cmd() . " $rpms");
-}
-
sub check_no_etc_files() {
if (my @l = grep { !m!/urpmi$! } glob("$::pwd/root/etc/*")) {
fail(join(' ', @l) . " files should not be there");
diff --git a/t/superuser--media_info_dir.t b/t/superuser--media_info_dir.t
index 75bca982..b2d616f2 100644
--- a/t/superuser--media_info_dir.t
+++ b/t/superuser--media_info_dir.t
@@ -9,6 +9,7 @@ use Test::More 'no_plan';
need_root_and_prepare();
various();
urpmq_various();
+urpmi_force_skip_unknown();
rpm_v3();
sub various {
@@ -33,6 +34,21 @@ sub urpmq_various {
urpmi_removemedia('-a');
}
+sub urpmi_force_skip_unknown {
+ my $name = 'various';
+ urpmi_addmedia("$name $::pwd/media/$name");
+
+ urpmi($name);
+ check_installed_and_remove($name);
+
+ test_urpmi_fail("$name unknown-pkg");
+
+ urpmi("--force $name unknown-pkg");
+ check_installed_and_remove($name);
+
+ urpmi_removemedia($name);
+}
+
sub rpm_v3 {
my @names = qw(libtermcap nls p2c);