From 57a4d47a7977a076a80602bdfa85a64c163f0502 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 18 Jan 2008 13:43:58 +0000 Subject: add some tests (including a failing one) --- t/data/SPECS/handle-conflict-deps/c.spec | 14 ++++++++++++++ t/data/SPECS/handle-conflict-deps/d.spec | 13 +++++++++++++ t/data/SPECS/handle-conflict-deps/e.spec | 14 ++++++++++++++ t/data/SPECS/handle-conflict-deps/f.spec | 14 ++++++++++++++ t/superuser--handle-conflict-deps.t | 20 ++++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 t/data/SPECS/handle-conflict-deps/c.spec create mode 100644 t/data/SPECS/handle-conflict-deps/d.spec create mode 100644 t/data/SPECS/handle-conflict-deps/e.spec create mode 100644 t/data/SPECS/handle-conflict-deps/f.spec (limited to 't') diff --git a/t/data/SPECS/handle-conflict-deps/c.spec b/t/data/SPECS/handle-conflict-deps/c.spec new file mode 100644 index 00000000..4d9d94e5 --- /dev/null +++ b/t/data/SPECS/handle-conflict-deps/c.spec @@ -0,0 +1,14 @@ +Summary: x +Name: c +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} +Conflicts: d + +%description +x + +%files diff --git a/t/data/SPECS/handle-conflict-deps/d.spec b/t/data/SPECS/handle-conflict-deps/d.spec new file mode 100644 index 00000000..350fc843 --- /dev/null +++ b/t/data/SPECS/handle-conflict-deps/d.spec @@ -0,0 +1,13 @@ +Summary: x +Name: d +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/handle-conflict-deps/e.spec b/t/data/SPECS/handle-conflict-deps/e.spec new file mode 100644 index 00000000..2acde237 --- /dev/null +++ b/t/data/SPECS/handle-conflict-deps/e.spec @@ -0,0 +1,14 @@ +Summary: x +Name: e +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} +Conflicts: ff + +%description +x + +%files diff --git a/t/data/SPECS/handle-conflict-deps/f.spec b/t/data/SPECS/handle-conflict-deps/f.spec new file mode 100644 index 00000000..b017fe58 --- /dev/null +++ b/t/data/SPECS/handle-conflict-deps/f.spec @@ -0,0 +1,14 @@ +Summary: x +Name: f +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} +Provides: ff + +%description +x + +%files diff --git a/t/superuser--handle-conflict-deps.t b/t/superuser--handle-conflict-deps.t index 998e26ff..72de5071 100644 --- a/t/superuser--handle-conflict-deps.t +++ b/t/superuser--handle-conflict-deps.t @@ -3,6 +3,12 @@ # b requires b-sub # a-sup requires a # a conflicts with b, b conflicts with a +# +# c conflicts with d +# +# e conflicts with ff +# f provides ff +# use strict; use lib '.', 't'; use helper; @@ -14,6 +20,11 @@ need_root_and_prepare(); my $name = 'handle-conflict-deps'; urpmi_addmedia("$name $::pwd/media/$name"); +test_simple('c', 'd'); +test_simple('d', 'c'); +#test_simple('e', 'f'); # ERROR +test_simple('f', 'e'); + test_conflict_on_install(); test_conflict_on_upgrade(); #test from bugs #12696, #11885 @@ -29,3 +40,12 @@ sub test_conflict_on_install { urpmi('--auto a b'); check_installed_and_remove('b', 'b-sub'); # WARNING: why does it choose one or the other? } + +sub test_simple { + my ($pkg1, $pkg2) = @_; + urpmi($pkg1); + check_installed_names($pkg1); + + urpmi("--auto $pkg2"); + check_installed_and_remove($pkg2); +} -- cgit v1.2.1