diff options
Diffstat (limited to 't')
-rw-r--r-- | t/00prepare.t | 13 | ||||
-rw-r--r-- | t/parse.t | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/t/00prepare.t b/t/00prepare.t new file mode 100644 index 0000000..d454c02 --- /dev/null +++ b/t/00prepare.t @@ -0,0 +1,13 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Test::More tests => 1; + +chdir 't' if -d 't'; +for (qw(BUILD RPMS RPMS/noarch)) { + mkdir $_; +} +# locally build a test rpm +system(rpmbuild => '--define', '_topdir .', '-bb', '--clean', '../test-rpm.spec'); +ok( -f 'RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm', 'rpm created' ); @@ -14,7 +14,7 @@ ok($a); END { unlink 'hdlist.cz' } -my ($start, $end) = $a->parse_rpms_build_headers(rpms => [ "test-rpm-1.0-1mdk.noarch.rpm" ], keep_all_tags => 1); +my ($start, $end) = $a->parse_rpms_build_headers(rpms => [ "t/RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm" ], keep_all_tags => 1); ok(@{$a->{depslist}} == 1); my $pkg = $a->{depslist}[0]; ok($pkg); |