Skip to content

Commit c927b91

Browse files
committed
tests: Callbacks generate a variable number of tests that we must count
1 parent 15dc100 commit c927b91

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

t/20_display.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@
33
use strict;
44
use warnings;
55

6-
use Test::More tests => 39;
6+
use Test::More;
77
BEGIN { use_ok('GSAPI') };
88

99
use bytes;
1010

11+
my $num_callbacks=0;
12+
1113
my( $width, $height, $raster, $format );
1214
sub callback
1315
{
1416
my( $name, $handle, $device, @more ) = @_;
1517

18+
$num_callbacks++;
19+
1620
my $pimage;
1721
if( @more and 1024 < length $more[-1] ) {
1822
$pimage = pop @_;
@@ -117,3 +121,5 @@ pass( 'run_file' );
117121

118122
GSAPI::exit($gs);
119123
pass( 'exit' );
124+
125+
done_testing(41 + $num_callbacks);

0 commit comments

Comments
 (0)