]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
fix perl cb test
authorTobias Oetiker <tobi@oetiker.ch>
Sat, 21 Feb 2015 17:18:43 +0000 (18:18 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Sat, 21 Feb 2015 17:18:43 +0000 (18:18 +0100)
bindings/perl-shared/t/callback.t

index acc55c630827457bb23556efce5c887e0e95a87c..47611d14521c1f921aa66d6da6065b240f3d6982 100755 (executable)
@@ -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);