#!/usr/bin/perl use warnings; use strict; use Test::More tests => 11; 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'); 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"'); my $fh; open($fh, ">", "t/$$.lin.ps"); print $fh $ps1; close($fh); open($fh, ">", "t/$$.log.ps"); print $fh $ps3; close($fh); #vim:tw=0