Parse the summary correctly. Added a test for that.
This commit is contained in:
parent
0d680d989e
commit
1b443acd25
2 changed files with 4 additions and 5 deletions
|
@ -60,7 +60,7 @@ sub parse_file {
|
|||
/^Name:\s*(\S+)/ and $self->{name} = $1;
|
||||
/^Version:\s*(\S+)/ and $self->{version} = $1;
|
||||
/^Release:\s*(\S+)/ and $self->{release} = $1;
|
||||
/^Summary:\s*(\S+)/ and $self->{summary} = $1;
|
||||
/^Summary:\s*(.+)/ and $self->{summary} = $1;
|
||||
/^License:\s*(.+)/ and $self->{license} = $1;
|
||||
/^Group:\s*(\S+)/ and $self->{group} = $1;
|
||||
/^URL:\s*(\S+)/ and $self->{url} = $1;
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
use Test::More tests => 11;
|
||||
use Test::More tests => 10;
|
||||
BEGIN { use_ok('Parse::RPM::Spec') };
|
||||
|
||||
ok($spec = Parse::RPM::Spec->new( { file => 't/file.spec' } ));
|
||||
isa_ok($spec, 'Parse::RPM::Spec');
|
||||
|
||||
ok($spec = Parse::RPM::Spec->new( { file => 't/file.spec' } ));
|
||||
isa_ok($spec, 'Parse::RPM::Spec');
|
||||
|
||||
is($spec->name, 'perl-Array-Compare');
|
||||
is($spec->summary, 'Perl extension for comparing arrays');
|
||||
|
||||
is($spec->version, '1.16');
|
||||
$spec->version('1.17');
|
||||
is($spec->version, '1.17');
|
||||
|
|
Loading…
Add table
Reference in a new issue