You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
868 B

use 5.014;
use strict;
use warnings;
# Test use of --set-module-option-value
use Test::More;
use ksb::Application;
my $app = ksb::Application->new(qw(
--pretend --rc-file t/data/sample-rc/kdesrc-buildrc
--set-module-option-value), 'module2,tag,fake-tag10',
'--set-module-option-value', 'setmod2,tag,tag-setmod10');
my @moduleList = @{$app->{modules}};
is(scalar @moduleList, 4, 'Right number of modules');
my $scm = $moduleList[3]->scm();
my ($branch, $type) = $scm->_determinePreferredCheckoutSource();
is($branch, 'refs/tags/fake-tag10', 'Right tag name');
is($type, 'tag', 'Result came back as a tag');
($branch, $type) = $moduleList[1]->scm()->_determinePreferredCheckoutSource();
is($branch, 'refs/tags/tag-setmod10', 'Right tag name (options block from cmdline)');
is($type, 'tag', 'cmdline options block came back as tag');
done_testing();