aboutsummaryrefslogtreecommitdiffstats
path: root/t/parse.t
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-24 16:14:31 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-24 16:14:31 +0000
commit625db09bfa3798d0ab8df98287cdb63177f15b82 (patch)
treecb51c83a85ea2819dd39d2f9fa7a7a944e7b63f2 /t/parse.t
parent6238b6c19d992ab03d6a1f7da8b7ea4b3e70e117 (diff)
downloadperl-URPM-625db09bfa3798d0ab8df98287cdb63177f15b82.tar
perl-URPM-625db09bfa3798d0ab8df98287cdb63177f15b82.tar.gz
perl-URPM-625db09bfa3798d0ab8df98287cdb63177f15b82.tar.bz2
perl-URPM-625db09bfa3798d0ab8df98287cdb63177f15b82.tar.xz
perl-URPM-625db09bfa3798d0ab8df98287cdb63177f15b82.zip
check ->arch on a source package header too
Diffstat (limited to 't/parse.t')
-rw-r--r--t/parse.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/parse.t b/t/parse.t
index f734894..64d7478 100644
--- a/t/parse.t
+++ b/t/parse.t
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 39;
+use Test::More tests => 41;
use MDV::Packdrakeng;
use URPM;
use URPM::Build;
@@ -111,3 +111,10 @@ ok(URPM::rpmvercmp("1:1-1mdk", "2:1-1mdk") == -1, "epoch 1 vs 2 = -1");
END { unlink "bad.spec" }
}
+{
+ my $c = URPM->new;
+ $c->parse_rpm('tmp/SRPMS/test-rpm-1.0-1mdk.src.rpm');
+ my $pkg = $c->{depslist}[0];
+ ok(defined $pkg, "Parsing a srpm works");
+ is($pkg->arch, 'src', 'srpm arch is "src"');
+}