From 4e4ad2677c430f39e67bfe61f3d37351650a8a88 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 30 Apr 2007 10:24:42 +0000 Subject: check the output displays "removing package a" --- t/superuser--obsolete-and-conflict.t | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/superuser--obsolete-and-conflict.t b/t/superuser--obsolete-and-conflict.t index 8116eaea..09e04f90 100644 --- a/t/superuser--obsolete-and-conflict.t +++ b/t/superuser--obsolete-and-conflict.t @@ -21,7 +21,11 @@ urpmi_addmedia("$name $::pwd/media/$name"); urpmi('a'); check_installed_names('a'); -urpmi('b c'); +test_urpmi("b c", <<'EOF'); + 1/2: c + 2/2: b +removing package a +EOF check_installed_names('b', 'c'); urpme('b c'); @@ -38,3 +42,15 @@ check_installed_names('a', 'd'); urpmi('--split-level 1 b c'); # argh, d is removed :-( #check_installed_names('b', 'c', 'd'); + + +sub test_urpmi { + my ($para, $wanted) = @_; + my $urpmi = urpmi_cmd(); + my $s = `$urpmi $para`; + + $s =~ s/\s*#{40}#*//g; + $s =~ s/.*\nPreparing\.\.\.\n//s; + + ok($s eq $wanted, "$wanted in $s"); +} -- cgit v1.2.1