From: Tobias Oetiker Date: Sat, 21 Feb 2015 17:18:43 +0000 (+0100) Subject: fix perl cb test X-Git-Tag: v1.5.0-rc2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae1caa3351ed3363ca83bb9cf0e63c2f7c965fe7;p=thirdparty%2Frrdtool-1.x.git fix perl cb test --- diff --git a/bindings/perl-shared/t/callback.t b/bindings/perl-shared/t/callback.t index acc55c63..47611d14 100755 --- a/bindings/perl-shared/t/callback.t +++ b/bindings/perl-shared/t/callback.t @@ -13,7 +13,10 @@ sub ok { my($what, $result) = @_ ; $ok_count++; - print "not " unless $result; + if (not $result){ + warn "failed $what\n"; + print "not "; + } print "ok $ok_count $what\n"; } @@ -56,10 +59,12 @@ my $result = RRDs::graphv "callback.png", "LINE:b#10b634:b", "LINE:c#503d14:c", "VDEF:av=a,AVERAGE", - "PRINT:av:%lf"; + "PRINT:av:%8.6lf"; if (my $ERROR = RRDs::error) { die "RRD ERROR: $ERROR\n"; } -ok("callback",$result->{'print[0]'} eq '0.725982'); +my $a = $result->{'print[0]'}; +my $b = '0.725982'; +ok("$a eq $b",$a eq $b);