diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-07 12:11:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-07 12:11:00 +0000 |
commit | 8ec15d1f9bb2a1352f9698981f48f95dad76f56d (patch) | |
tree | 5ff0dccad3ec548c82b47b5710fbfbde128702cd /t | |
parent | 573e3487d99e76a311cf4b82ba0af95943182d20 (diff) | |
download | urpmi-8ec15d1f9bb2a1352f9698981f48f95dad76f56d.tar urpmi-8ec15d1f9bb2a1352f9698981f48f95dad76f56d.tar.gz urpmi-8ec15d1f9bb2a1352f9698981f48f95dad76f56d.tar.bz2 urpmi-8ec15d1f9bb2a1352f9698981f48f95dad76f56d.tar.xz urpmi-8ec15d1f9bb2a1352f9698981f48f95dad76f56d.zip |
add more tests showing the need for promotion
Diffstat (limited to 't')
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-1/d.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-1/e.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-2/c.spec | 13 | ||||
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-2/e.spec | 14 | ||||
-rw-r--r-- | t/superuser--split-transactions--conflict.t | 33 |
5 files changed, 87 insertions, 1 deletions
diff --git a/t/data/SPECS/split-transactions--conflict-1/d.spec b/t/data/SPECS/split-transactions--conflict-1/d.spec new file mode 100644 index 00000000..663fb2b0 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-1/d.spec @@ -0,0 +1,14 @@ +Summary: x +Name: d +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Conflicts: c +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--conflict-1/e.spec b/t/data/SPECS/split-transactions--conflict-1/e.spec new file mode 100644 index 00000000..e94d021b --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-1/e.spec @@ -0,0 +1,14 @@ +Summary: x +Name: e +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: d +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--conflict-2/c.spec b/t/data/SPECS/split-transactions--conflict-2/c.spec new file mode 100644 index 00000000..21381cf9 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-2/c.spec @@ -0,0 +1,13 @@ +Summary: x +Name: c +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--conflict-2/e.spec b/t/data/SPECS/split-transactions--conflict-2/e.spec new file mode 100644 index 00000000..d80b1df1 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-2/e.spec @@ -0,0 +1,14 @@ +Summary: x +Name: e +Version: 2 +Release: 1 +License: x +Group: x +Url: x +Requires: c +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/superuser--split-transactions--conflict.t b/t/superuser--split-transactions--conflict.t index ec88b664..a0332283 100644 --- a/t/superuser--split-transactions--conflict.t +++ b/t/superuser--split-transactions--conflict.t @@ -5,6 +5,9 @@ # b-2 requires d # d conflicts with c # +# e-1 requires d +# e-2 requires c +# use strict; use lib '.', 't'; use helper; @@ -20,12 +23,40 @@ urpmi_addmedia("$name-2 $::pwd/media/$name-2"); test('--split-length 0'); test('--split-level 1'); +test_d('--split-length 0'); +test_d('--split-level 1'); + +test_e('--split-length 0'); +test_e('--split-level 1'); + sub test { my ($option) = @_; urpmi("--media $name-1 --auto a b c"); check_installed_fullnames('a-1-1', 'b-1-1', 'c-1-1'); - urpmi("--media $name-2 $option --auto --auto-select"); + urpmi("--media $name-2 --auto $option --auto-select"); check_installed_fullnames_and_remove('a-1-1', 'b-2-1', 'd-1-1'); } + +sub test_d { + my ($option) = @_; + + urpmi("--media $name-1 --auto a b c"); + check_installed_fullnames('a-1-1', 'b-1-1', 'c-1-1'); + + #- below would need the promotion of "b-2" (upgraded from "b-1") + urpmi("--media $name-2 --auto $option d"); + check_installed_fullnames_and_remove('d-1-1'); +} + +sub test_e { + my ($option) = @_; + + urpmi("--media $name-1 --auto e"); + check_installed_fullnames('d-1-1', 'e-1-1'); + + #- below would need the promotion of "e-2" (upgraded from "e-1") + urpmi("--media $name-2 --auto $option c"); + check_installed_fullnames_and_remove('c-1-1'); +} |