From c992e5fb8eeff8a345d16aa73866a320219fbf8b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 13 Aug 2007 14:21:44 +0000 Subject: add one "directory owned by 2 rpms" test --- t/data/SPECS/file-conflicts/a.spec | 3 ++- t/data/SPECS/file-conflicts/d.spec | 22 ++++++++++++++++++++++ t/superuser--file-conflicts.t | 16 ++++++++++++++-- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 t/data/SPECS/file-conflicts/d.spec (limited to 't') diff --git a/t/data/SPECS/file-conflicts/a.spec b/t/data/SPECS/file-conflicts/a.spec index abd35421..5378ee9a 100644 --- a/t/data/SPECS/file-conflicts/a.spec +++ b/t/data/SPECS/file-conflicts/a.spec @@ -12,9 +12,10 @@ x %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc +install -d $RPM_BUILD_ROOT/etc/dir echo a > $RPM_BUILD_ROOT/etc/foo echo bar > $RPM_BUILD_ROOT/etc/bar +echo a > $RPM_BUILD_ROOT/etc/dir/a %clean rm -rf $RPM_BUILD_ROOT diff --git a/t/data/SPECS/file-conflicts/d.spec b/t/data/SPECS/file-conflicts/d.spec new file mode 100644 index 00000000..863abf06 --- /dev/null +++ b/t/data/SPECS/file-conflicts/d.spec @@ -0,0 +1,22 @@ +Summary: x +Name: d +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildArch: noarch + +%description +x + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT/etc/dir +echo d > $RPM_BUILD_ROOT/etc/dir/d + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +/etc/* diff --git a/t/superuser--file-conflicts.t b/t/superuser--file-conflicts.t index 8580b6f5..32e04489 100644 --- a/t/superuser--file-conflicts.t +++ b/t/superuser--file-conflicts.t @@ -27,16 +27,22 @@ sub test_rpm_same_transaction { test_rpm_i_succeeds('a', 'c'); check_installed_and_remove('a', 'c'); + + test_rpm_i_succeeds('a', 'd'); + check_installed_and_remove('a', 'd'); } sub test_rpm_different_transactions { test_rpm_i_succeeds('a'); - test_rpm_i_fail('b'); check_installed_names('a'); test_rpm_i_succeeds('c'); check_installed_and_remove('a', 'c'); + + test_rpm_i_succeeds('a'); + test_rpm_i_succeeds('d'); + check_installed_and_remove('a', 'd'); } sub test_urpmi_same_transaction { @@ -46,17 +52,23 @@ sub test_urpmi_same_transaction { urpmi('a c'); check_installed_and_remove('a', 'c'); + + urpmi('a d'); + check_installed_and_remove('a', 'd'); } sub test_urpmi_different_transactions { urpmi('a'); - test_urpmi_fail('b'); check_installed_names('a'); # disabled, fail when dropping RPMTAG_FILEDIGESTS #urpmi('c'); #check_installed_and_remove('a', 'c'); + + #urpmi('a'); + urpmi('d'); + check_installed_and_remove('a', 'd'); } sub test_rpm_i_succeeds { -- cgit v1.2.1