summaryrefslogtreecommitdiffstats
path: root/RPM4/t
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2021-06-05 17:12:34 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2022-04-27 00:03:14 +0200
commitd8460fc3d17b57dbb4048fe7911cf80644797095 (patch)
tree86f6517b509b5862067fa82528114292847db3a1 /RPM4/t
parentf4894c3dfbc6dfce0bc02d260827c96499cd0226 (diff)
downloadperl-RPM4-d8460fc3d17b57dbb4048fe7911cf80644797095.tar
perl-RPM4-d8460fc3d17b57dbb4048fe7911cf80644797095.tar.gz
perl-RPM4-d8460fc3d17b57dbb4048fe7911cf80644797095.tar.bz2
perl-RPM4-d8460fc3d17b57dbb4048fe7911cf80644797095.tar.xz
perl-RPM4-d8460fc3d17b57dbb4048fe7911cf80644797095.zip
Split callback so that it can be reused
Diffstat (limited to 'RPM4/t')
-rw-r--r--RPM4/t/05transaction.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/RPM4/t/05transaction.t b/RPM4/t/05transaction.t
index 16da607..4e10cea 100644
--- a/RPM4/t/05transaction.t
+++ b/RPM4/t/05transaction.t
@@ -75,7 +75,7 @@ ok($ts->transcheck == 0, "Checking transaction works");
ok($ts->transorder == 0, "Run transaction order");
ok(defined($ts->transflag([qw(JUSTDB)])), "Set transflags");
-ok($ts->transrun(sub { my %a = @_; print STDERR "$a{what} $a{amount} / $a{total}\n" }) == 0, "Running transaction justdb");
+ok($ts->transrun(\&callback) == 0, "Running transaction justdb");
my $found = 0;
my $roffset;
@@ -148,3 +148,8 @@ isa_ok($spec, 'RPM4::Spec', 'ts->newspec');
$ts = undef; # explicitely calling DESTROY to close database
rmtree($tempdir);
+
+sub callback {
+ my %a = @_;
+ print STDERR "$a{what} $a{amount} / $a{total}\n";
+}