diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-07 11:29:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-07 11:29:03 +0000 |
commit | a50f282e577e45d929902d342554f9a3519b9901 (patch) | |
tree | 5b6c7191ec8912038a85ba9ef933b47bcd1e4118 /t/superuser--split-transactions--promote.t | |
parent | e4179a5e22b5ddfa6ebbc5cbbb7abad0f0f149a9 (diff) | |
download | urpmi-a50f282e577e45d929902d342554f9a3519b9901.tar urpmi-a50f282e577e45d929902d342554f9a3519b9901.tar.gz urpmi-a50f282e577e45d929902d342554f9a3519b9901.tar.bz2 urpmi-a50f282e577e45d929902d342554f9a3519b9901.tar.xz urpmi-a50f282e577e45d929902d342554f9a3519b9901.zip |
add a simple test case for promotion on conflict
Diffstat (limited to 't/superuser--split-transactions--promote.t')
-rw-r--r-- | t/superuser--split-transactions--promote.t | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/t/superuser--split-transactions--promote.t b/t/superuser--split-transactions--promote.t index d13ed470..bbee7f5b 100644 --- a/t/superuser--split-transactions--promote.t +++ b/t/superuser--split-transactions--promote.t @@ -6,6 +6,9 @@ # c requires d # d1-1 provides d, but not d1-2 # d2-2 provides d, but not d2-1 +# +# e-2 conflicts with f-1 +# use strict; use lib '.', 't'; use helper; @@ -14,20 +17,27 @@ use Test::More 'no_plan'; need_root_and_prepare(); -my $name = 'split-transactions--strict-require'; +my $name = 'split-transactions--promote'; urpmi_addmedia("$name-1 $::pwd/media/$name-1"); urpmi_addmedia("$name-2 $::pwd/media/$name-2"); -#- below need the promotion of "a-2" (upgraded from "a-1") -test_ab('--split-length 0 b'); -test_ab('--split-level 1 b'); +test('--split-length 0'); +test('--split-level 1'); + +sub test { + my ($split) = @_; -test_ab('--split-length 0 --auto-select'); -test_ab('--split-level 1 --auto-select'); + test_ab("$split --auto-select"); -#- below need the promotion of "d2" (new package to install) -test_cd('--split-length 0 d1'); -test_cd('--split-level 1 d1'); + #- below need the promotion of "a-2" (upgraded from "a-1") to work + test_ab("$split b"); + + #- below need the promotion of "d2" (new installed package) to work + test_cd("$split d1"); + + #- below need the promotion of "f-2" (upgraded from "f-1") to work + test_ef("$split e"); +} sub test_ab { my ($para) = @_; @@ -48,3 +58,13 @@ sub test_cd { urpmi("--media $name-2 --auto $para"); check_installed_fullnames_and_remove('c-1-1', 'd1-2-1', 'd2-2-1'); } + +sub test_ef { + my ($para) = @_; + + urpmi("--media $name-1 --auto e f"); + check_installed_names('f', 'e'); + + urpmi("--media $name-2 --auto $para"); + check_installed_fullnames_and_remove('e-2-1', 'f-2-1'); +} |