From 08feb6419b253223ca99f9ee42b27dec034a6945 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 14 Dec 2007 14:54:04 +0000 Subject: - check "old suggests" are still handled. ie RPMTAG_REQUIRENAME + RPMSENSE_MISSINGOK, instead of RPMTAG_SUGGESTSNAME (as done in SuSE and in Mandriva > 2008.0) --- t/02create_pkgs.t | 3 +++ t/data/old-suggests-1-1.noarch.rpm | Bin 0 -> 1396 bytes t/superuser--suggests.t | 5 +++++ 3 files changed, 8 insertions(+) create mode 100644 t/data/old-suggests-1-1.noarch.rpm diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t index 7d63037b..9d8058e4 100644 --- a/t/02create_pkgs.t +++ b/t/02create_pkgs.t @@ -11,6 +11,9 @@ foreach (qw(media tmp tmp/BUILD tmp/RPMS tmp/RPMS/noarch tmp/SRPMS)) { mkdir $_; } +mkdir "media/suggests"; +system_("cp data/old-suggests-1-1.noarch.rpm media/suggests"); + # locally build test rpms foreach my $dir (grep { -d $_ } glob("data/SPECS/*")) { diff --git a/t/data/old-suggests-1-1.noarch.rpm b/t/data/old-suggests-1-1.noarch.rpm new file mode 100644 index 00000000..628a70e9 Binary files /dev/null and b/t/data/old-suggests-1-1.noarch.rpm differ diff --git a/t/superuser--suggests.t b/t/superuser--suggests.t index e6caeaa3..5a5c7027 100644 --- a/t/superuser--suggests.t +++ b/t/superuser--suggests.t @@ -30,6 +30,7 @@ test_invalid(); test_upgrade(); test_d(); test_force_suggests(); +test_old_suggests(); sub test_b { test('b', ['bb'], ['suggested_b']); @@ -47,6 +48,10 @@ sub test_invalid { check_installed_and_remove('with-invalid'); } +sub test_old_suggests { + test('old-suggests', [], ['suggested_b']); +} + sub test { my ($name, $required, $suggested) = @_; urpmi("--no-suggests --auto $name"); -- cgit v1.2.1