aboutsummaryrefslogtreecommitdiffstats
path: root/t/parse.t
diff options
context:
space:
mode:
Diffstat (limited to 't/parse.t')
-rw-r--r--t/parse.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/parse.t b/t/parse.t
index d27c15f..29a6386 100644
--- a/t/parse.t
+++ b/t/parse.t
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 27;
+use Test::More tests => 28;
use MDV::Packdrakeng;
use URPM;
use URPM::Build;
@@ -72,4 +72,10 @@ ok(URPM::rpmvercmp("1:1-1mdk", "2:1-1mdk") == -1, "epoch 1 vs 2 = -1");
ok($pkg->get_tag(1000) eq 'test-rpm', 'parsed correctly');
$pkg = URPM::spec2srcheader("doesnotexist.spec");
ok(!defined $pkg, "non-existent spec");
+ open my $f, '>', 'bad.spec' or die "Can't write bad.spec: $!\n";
+ print $f "Name: foo\nVerssion: 2\n";
+ close $f;
+ $pkg = URPM::spec2srcheader("bad.spec");
+ ok(!defined $pkg, "bad spec");
+ END { unlink "bad.spec" }
}