diff options
author | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2007-07-20 08:07:42 +0000 |
---|---|---|
committer | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2007-07-20 08:07:42 +0000 |
commit | 21497f8d0da9b9884ed879907cf223c401008393 (patch) | |
tree | 203224a4fb8ad73e610436cc21c6997868433feb /RPM4/t | |
parent | 9509c87e03c67749f953699f0f0f0b1e1e6c0e08 (diff) | |
download | perl-RPM4-21497f8d0da9b9884ed879907cf223c401008393.tar perl-RPM4-21497f8d0da9b9884ed879907cf223c401008393.tar.gz perl-RPM4-21497f8d0da9b9884ed879907cf223c401008393.tar.bz2 perl-RPM4-21497f8d0da9b9884ed879907cf223c401008393.tar.xz perl-RPM4-21497f8d0da9b9884ed879907cf223c401008393.zip |
- fix spec->source ignoring everything
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@133 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4/t')
-rw-r--r-- | RPM4/t/04spec.t | 5 | ||||
-rw-r--r-- | RPM4/t/test-source.spec | 37 |
2 files changed, 41 insertions, 1 deletions
diff --git a/RPM4/t/04spec.t b/RPM4/t/04spec.t index 2fbbb04..555ec59 100644 --- a/RPM4/t/04spec.t +++ b/RPM4/t/04spec.t @@ -1,7 +1,7 @@ # $Id$ use strict; -use Test::More tests => 24; +use Test::More tests => 27; use FindBin qw($Bin); use File::Temp qw(tempdir); use RPM4; @@ -61,3 +61,6 @@ my ($bh) = $spec->binheader(); ok(defined($bh), "Can get binary header from spec"); ok($bh->queryformat("%{NAME}") eq "test-rpm", "can querying header give by spec"); +ok($spec = RPM4::Spec->new("$Bin/test-source.spec", force => 1), "can load spec"); +is(($spec->sources)[0], 'source.tar.gz', "can list source"); +is(($spec->sources_url)[0], 'http://rpm4.zarb.org/source.tar.gz', "can list source with url"); diff --git a/RPM4/t/test-source.spec b/RPM4/t/test-source.spec new file mode 100644 index 0000000..3f87f82 --- /dev/null +++ b/RPM4/t/test-source.spec @@ -0,0 +1,37 @@ +# $Id: test-rpm.spec 109 2006-06-21 14:47:24Z nanardon $ +Summary: test rpm for perl-URPM test suite +BuildArch: noarch +Name: test-rpm +Version: 1.0 +Release: 1mdk +License: GPL +Group: Application/Development +BuildRoot: %{_tmppath}/%{name}-root +Url: http://rpm4.zarb.org/ +Source: http://rpm4.zarb.org/source.tar.gz + +%description +test rpm + +%prep + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%_sysconfdir + +date >> $RPM_BUILD_ROOT%_sysconfdir/%name + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%config(noreplace) %_sysconfdir/%name + +%changelog +* Thu Apr 22 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1-1mdk +- initial build + + |