From 0a1719e9c340767641112ab79120cae41669f755 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 8 Jun 2012 18:50:43 +0000 Subject: (system_should_partially_fail,urpmi_partial) introduce them for next commit --- t/helper.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/helper.pm b/t/helper.pm index e3c3a008..ba625ea8 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 run_urpm_cmd urpmi_cmd urpmi test_urpmi_fail urpme + urpm_cmd run_urpm_cmd urpmi_cmd urpmi urpmi_partial test_urpmi_fail urpme urpmi_cfg set_urpmi_cfg_global_options system_ system_should_fail rpm_is_jbj_version @@ -78,6 +78,10 @@ sub urpmi_update { my ($para) = @_; system_(urpm_cmd('urpmi.update') . " $para"); } +sub urpmi_partial { + my ($para) = @_; + system_should_partially_fail(urpmi_cmd() . " --ignoresize $para"); +} sub urpmi { my ($para) = @_; system_(urpmi_cmd() . " --ignoresize $para"); @@ -106,6 +110,11 @@ sub system_ { system($cmd); ok($? == 0, $cmd); } +sub system_should_partially_fail { + my ($cmd) = @_; + system($cmd); + ok($? == 17 << 8, $cmd); +} sub system_should_fail { my ($cmd) = @_; system($cmd); -- cgit v1.2.1