diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-19 13:24:14 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-19 13:24:14 +0000 |
commit | 787fd6f4f4c904510a477641dd21197b6564318c (patch) | |
tree | f13a997dd191aa72a52b4caa87bd4f66bedfce17 /t | |
parent | ec9cacadc5e93e90a4c4e859a04c716edba442b3 (diff) | |
download | perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar.gz perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar.bz2 perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar.xz perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.zip |
In spec2srcheader(): extend stack; fudge with errno.
Diffstat (limited to 't')
-rw-r--r-- | t/parse.t | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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" } } |