2006-08-29 10:14:27 +02:00
|
|
|
#!/usr/bin/perl
|
|
|
|
use warnings;
|
|
|
|
use strict;
|
2007-09-06 09:08:03 +02:00
|
|
|
use Test::More tests => 12;
|
2006-08-29 10:14:27 +02:00
|
|
|
|
|
|
|
my $ps1=`./blib/script/tsplot --output_format ps t/1.data`;
|
|
|
|
ok($ps1, 'Postscript output of tsplot is not empty');
|
|
|
|
ok($ps1 =~ m/\(2006-06-04\) Rshow/, 'Postscript output of tsplot contains a date');
|
|
|
|
ok($ps1 =~ m/\(val1\) Rshow/, 'Postscript output of tsplot contains a column name');
|
|
|
|
|
|
|
|
my $ps2=`./blib/script/tsplotv --output_format ps t/1.vdata`;
|
|
|
|
ok($ps2, 'Postscript output of tsplot is not empty');
|
|
|
|
ok($ps2 =~ m/\(2006-06-04\) Rshow/, 'Postscript output of tsplot contains a date');
|
|
|
|
ok($ps2 =~ m/\(val1\) Rshow/, 'Postscript output of tsplot contains a column name');
|
|
|
|
|
|
|
|
# title and creation date will be different, but the rest should be
|
|
|
|
# identical:
|
|
|
|
$ps1 =~ s/^%%Title: .*//m;
|
|
|
|
$ps1 =~ s/^%%CreationDate: .*//m;
|
|
|
|
$ps2 =~ s/^%%Title: .*//m;
|
|
|
|
$ps2 =~ s/^%%CreationDate: .*//m;
|
|
|
|
ok($ps1 eq $ps2, 'output of tsplot and tsplotv are identical');
|
|
|
|
|
2006-10-25 10:52:00 +02:00
|
|
|
my $ps3=`./blib/script/tsplot --output_format ps --log_y t/1.data`;
|
|
|
|
ok($ps3, 'Postscript output of tsplot is not empty');
|
|
|
|
ok($ps3 !~ m/\( 0\) Rshow/, 'Postscript output of tsplot doesn\'t contain marker "0"');
|
|
|
|
ok($ps3 =~ m/\( 1\) Rshow/, 'Postscript output of tsplot contains marker "1"');
|
|
|
|
ok($ps3 =~ m/\( 10\) Rshow/, 'Postscript output of tsplot contains marker "10"');
|
|
|
|
|
2007-09-06 09:08:03 +02:00
|
|
|
my $ps4=`./blib/script/tsplot --output_format ps --style dots t/1.data`;
|
|
|
|
ok($ps4, 'Postscript output of tsplot --style dots is not empty');
|
|
|
|
|
2006-10-25 10:52:00 +02:00
|
|
|
my $fh;
|
|
|
|
open($fh, ">", "t/$$.lin.ps"); print $fh $ps1; close($fh);
|
2007-09-06 09:08:03 +02:00
|
|
|
open($fh, ">", "t/$$.dot.ps"); print $fh $ps4; close($fh);
|
2006-10-25 10:52:00 +02:00
|
|
|
|
2006-08-29 10:14:27 +02:00
|
|
|
#vim:tw=0
|