aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-19 13:05:54 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-19 13:05:54 +0000
commitec9cacadc5e93e90a4c4e859a04c716edba442b3 (patch)
tree6767aedb57ffc5c77d4ef77ecc4f6820463bafae /t
parent35a1e7817d16df95fa4a416c9a9ac2c9a059c9de (diff)
downloadperl-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.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/parse.t b/t/parse.t
index afe59b3..d27c15f 100644
--- a/t/parse.t
+++ b/t/parse.t
@@ -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");
}