summaryrefslogtreecommitdiffstats
path: root/RPM4/t/05transaction.t
diff options
context:
space:
mode:
Diffstat (limited to 'RPM4/t/05transaction.t')
-rw-r--r--RPM4/t/05transaction.t34
1 files changed, 19 insertions, 15 deletions
diff --git a/RPM4/t/05transaction.t b/RPM4/t/05transaction.t
index 4e10cea..070c918 100644
--- a/RPM4/t/05transaction.t
+++ b/RPM4/t/05transaction.t
@@ -42,21 +42,7 @@ ok($ts->transadd($hd, "$Bin/test-dep-1.0-1mdk.noarch.rpm") == 0, "Adding a packa
ok($ts->transcheck == 0, "Checking transaction works");
ok($ts->transorder == 0, "Run transaction order");
-my $pbs = RPM4::Transaction::Problems->new($ts);
-isa_ok(
- $pbs,
- 'RPM4::Transaction::Problems',
- 'Can retrieve pb from transaction'
-);
-
-ok($pbs->count, "Can get number of problems");
-
-ok($pbs->init || 1, "Resetting problems counter");
-my $strpb;
-while ($pbs->hasnext) {
- $strpb .= $pbs->problem;
-}
-ok($strpb, "Can get problem description");
+process_problems();
ok(defined($ts->transflag([qw(TEST)])), "Set transflags");
#ok($ts->transrun([ qw(LABEL PERCENT) ]) == 0, "Running test transaction");
@@ -153,3 +139,21 @@ sub callback {
my %a = @_;
print STDERR "$a{what} $a{amount} / $a{total}\n";
}
+
+sub process_problems() {
+ my $pbs = RPM4::Transaction::Problems->new($ts);
+ isa_ok(
+ $pbs,
+ 'RPM4::Transaction::Problems',
+ 'Can retrieve pb from transaction'
+ );
+
+ ok($pbs->count, "Can get number of problems");
+
+ ok($pbs->init || 1, "Resetting problems counter");
+ my $strpb;
+ while ($pbs->hasnext) {
+ $strpb .= $pbs->problem;
+ }
+ ok($strpb, "Can get problem description");
+}