diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-19 13:05:54 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-19 13:05:54 +0000 |
commit | ec9cacadc5e93e90a4c4e859a04c716edba442b3 (patch) | |
tree | 6767aedb57ffc5c77d4ef77ecc4f6820463bafae /t | |
parent | 35a1e7817d16df95fa4a416c9a9ac2c9a059c9de (diff) | |
download | perl-URPM-ec9cacadc5e93e90a4c4e859a04c716edba442b3.tar perl-URPM-ec9cacadc5e93e90a4c4e859a04c716edba442b3.tar.gz perl-URPM-ec9cacadc5e93e90a4c4e859a04c716edba442b3.tar.bz2 perl-URPM-ec9cacadc5e93e90a4c4e859a04c716edba442b3.tar.xz perl-URPM-ec9cacadc5e93e90a4c4e859a04c716edba442b3.zip |
Return undef on spec parsing failure
Diffstat (limited to 't')
-rw-r--r-- | t/parse.t | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,12 +4,15 @@ use strict; use warnings; -use Test::More tests => 26; +use Test::More tests => 27; use MDV::Packdrakeng; use URPM; use URPM::Build; use URPM::Query; +# shut up +URPM::setVerbosity(2); + my $a = new URPM; ok($a); @@ -66,5 +69,7 @@ ok(URPM::rpmvercmp("1:1-1mdk", "2:1-1mdk") == -1, "epoch 1 vs 2 = -1"); { my $pkg = URPM::spec2srcheader("test-rpm.spec"); ok(defined $pkg, "Parsing a spec works"); - ok($pkg->get_tag(1000) eq 'test-rpm'); + ok($pkg->get_tag(1000) eq 'test-rpm', 'parsed correctly'); + $pkg = URPM::spec2srcheader("doesnotexist.spec"); + ok(!defined $pkg, "non-existent spec"); } |