From 625db09bfa3798d0ab8df98287cdb63177f15b82 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 24 Aug 2012 16:14:31 +0000 Subject: check ->arch on a source package header too --- t/parse.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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"'); +} -- cgit v1.2.1