summaryrefslogtreecommitdiffstats
path: root/RPM4/t/04spec.t
diff options
context:
space:
mode:
authortv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-12-18 00:14:31 +0000
committertv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-12-18 00:14:31 +0000
commit7ccfd687e6b1554ebcdb123979f005523a1b89b1 (patch)
tree1dfe48275990559a7652d3b6b45eabe7914b0531 /RPM4/t/04spec.t
parentf2b68f33b2083673835a2bcb6307861611bf7a98 (diff)
downloadperl-RPM4-7ccfd687e6b1554ebcdb123979f005523a1b89b1.tar
perl-RPM4-7ccfd687e6b1554ebcdb123979f005523a1b89b1.tar.gz
perl-RPM4-7ccfd687e6b1554ebcdb123979f005523a1b89b1.tar.bz2
perl-RPM4-7ccfd687e6b1554ebcdb123979f005523a1b89b1.tar.xz
perl-RPM4-7ccfd687e6b1554ebcdb123979f005523a1b89b1.zip
perl_checker cleanups
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@237 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4/t/04spec.t')
-rw-r--r--RPM4/t/04spec.t16
1 files changed, 8 insertions, 8 deletions
diff --git a/RPM4/t/04spec.t b/RPM4/t/04spec.t
index 6743cfa..38bbed0 100644
--- a/RPM4/t/04spec.t
+++ b/RPM4/t/04spec.t
@@ -9,8 +9,8 @@ use RPM4;
my %info = RPM4::moduleinfo();
-my $testdir = tempdir( CLEANUP => 1 );
-mkdir("$testdir/$_") foreach (qw(BUILD RPMS RPMS/noarch SRPMS));
+my $testdir = tempdir(CLEANUP => 1);
+mkdir("$testdir/$_") foreach qw(BUILD RPMS RPMS/noarch SRPMS);
RPM4::add_macro("_tmppath $testdir");
RPM4::add_macro("_builddir $testdir");
@@ -25,9 +25,9 @@ ok(!RPM4::installsrpm("$Bin/test-rpm-1.0-1mdk.noarch.rpm"), "installsrpms works"
my $spec;
if ($info{Hack} eq "Yes") {
- ok( defined(RPM4::Spec->new()), "Create an empty spec object");
+ ok(defined(RPM4::Spec->new), "Create an empty spec object");
} else {
- ok(! defined(RPM4::Spec->new()), "Create an empty spec object don't works");
+ ok(! defined(RPM4::Spec->new), "Create an empty spec object don't works");
}
ok(!defined($spec = RPM4::Spec->new("$Bin/test-rpm-1.0-1mdk.noarch.rpm")), "Loading a bad spec file");
ok($spec = RPM4::Spec->new("$Bin/test-rpm.spec"), "Loading a spec file");
@@ -38,10 +38,10 @@ ok($rpms[0] =~ m!noarch/test-rpm-1.0-1mdk.noarch.rpm$!, "binrpm return good valu
ok($spec->srcrpm =~ m!SRPMS/test-rpm-1.0-1mdk.src.rpm$!, "srcrpm return good value");
-ok(!defined($spec->check()), "Running spec::check");
+ok(!defined($spec->check), "Running spec::check");
my $h;
-ok(defined($h = $spec->srcheader()), "Geting source header before build");
+ok(defined($h = $spec->srcheader), "Geting source header before build");
ok($h->queryformat("%{NAME}") eq "test-rpm", "can querying header give by spec");
ok($spec->build([ qw(PREP) ]) == 0, "simulate rpm -bp (check prep)");
@@ -53,11 +53,11 @@ ok($spec->build([ qw(PACKAGESOURCE) ]) == 0, "simulate rpm -bs");
#ok($spec->rpmbuild("bb") == 0, "testing spec->rpmbuild(-bb)");
ok($spec->build([ qw(RMBUILD RMSOURCE) ]) == 0, "simulate cleaning spec, source, build");
-ok(defined($h = $spec->srcheader()), "Geting source header after build");
+ok(defined($h = $spec->srcheader), "Geting source header after build");
ok($h->queryformat("%{NAME}") eq "test-rpm", "can querying header give by spec");
is($h->tag("URL"), "http://rpm4.zarb.org/", "can get url give by spec");
-my ($bh) = $spec->binheader();
+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");