timeseries/t/3missing.t

42 lines
628 B
Perl
Raw Normal View History

2006-09-08 12:26:36 +02:00
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 3;
BEGIN { use_ok( 'TimeSeries' ); }
my $ts = TimeSeries->new(output_format => 'ps');
ok($ts, 'create timeseries');
$ts->add(0, 100);
$ts->add(1000, 200);
$ts->add(2000, 100);
$ts->add(3000, undef);
$ts->add(4000, 100);
$ts->add(5000, 200);
$ts->add(6000, 100);
$ts->legend('missing');
my $p = $ts->plot();
my $t = "LT0
6395 4739 M
399 0 V
574 1344 M
1639 4872 L
2703 1344 L
2130 0 R
5897 4872 L
6962 1344 L
1.000 UL
LTb
574 1344 M
6388 0 V
0 3528 V
-6388 0 V
0 -3528 V
1.000 UP
stroke";
ok(index($p, $t) != -1, 'postscript output looks ok');
#vim:tw=0