From c9384f5f63c4793968a639288b875aeba923b7f3 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Mon, 8 Feb 2021 23:03:15 -0800 Subject: [PATCH] added "tuplesize" tests --- t/error-bars-using-tuplesize-tuplesizeall.ref | 39 +++++++++++++++++++ t/error-bars-using-tuplesize.ref | 39 +++++++++++++++++++ t/plots.t | 14 ++++++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 t/error-bars-using-tuplesize-tuplesizeall.ref create mode 100644 t/error-bars-using-tuplesize.ref diff --git a/t/error-bars-using-tuplesize-tuplesizeall.ref b/t/error-bars-using-tuplesize-tuplesizeall.ref new file mode 100644 index 0000000..00657cb --- /dev/null +++ b/t/error-bars-using-tuplesize-tuplesizeall.ref @@ -0,0 +1,39 @@ + +-------------------------------------------------------------------------------------------+ + | + + + + + + + | + | | + | | + 5 |-+ +-| + | | + | | + | *| + | *** | + | * | + |# * | + 4 |#+ A +-| + |# * | + | * | + | *** | + | | + | *** | + | # # * | + 3 |-+ #########B## A +-| + | # # * | + | *** | + | | + | | + | | + | *** # # | + 2 |-+ A ##############B### +-| + | * # # | + | *** | + | | + | | + | | + | # # | + 1 |*+ ##################B##### +-| + |* # # | + | | + | + + + + + + + | + +-------------------------------------------------------------------------------------------+ + 1 1.5 2 2.5 3 3.5 4 4.5 5 + diff --git a/t/error-bars-using-tuplesize.ref b/t/error-bars-using-tuplesize.ref new file mode 100644 index 0000000..3a099a7 --- /dev/null +++ b/t/error-bars-using-tuplesize.ref @@ -0,0 +1,39 @@ + 5.5 +-----------------------------------------------------------------------------------------+ + | + + + + + + + | + | | + | | + 5 |-+ +-| + | | + | | + 4.5 |-+ +*| + | *** | + | * | + | * | + 4 |-+ A +-| + | * | + | * | + 3.5 |-+ *** +-| + | | + | *** | + | * | + 3 |-+ A +-| + | * | + | *** | + | | + 2.5 |-+ +-| + | | + | *** | + 2 |-+ A +-| + | * | + | *** | + | | + 1.5 |-+ +-| + | | + | | + 1 |*+ +-| + |* | + | | + | + + + + + + + | + 0.5 +-----------------------------------------------------------------------------------------+ + 1 1.5 2 2.5 3 3.5 4 4.5 5 + diff --git a/t/plots.t b/t/plots.t index c20a958..642d4d3 100644 --- a/t/plots.t +++ b/t/plots.t @@ -39,7 +39,7 @@ BEGIN { } } -use Test::More tests => 58; +use Test::More tests => 60; use File::Temp 'tempfile'; use IPC::Run 'run'; use String::ShellQuote; @@ -163,6 +163,11 @@ tryplot( testname => 'Error bars (using rangesizeall)', qw(--rangesizeall 2 --with errorbars)], refplot => 'error-bars-using-rangesizeall.ref' ); +tryplot( testname => 'Error bars (using tuplesize)', + cmd => q{seq 5 | gawk '{print $1,$1,$1/10}'}, + options => [qw(--domain), + qw(--tuplesizeall 3 --with errorbars)], + refplot => 'error-bars-using-tuplesize.ref' ); tryplot( testname => 'Error bars (using rangesize, rangesizeall)', cmd => q{seq 5 | gawk '{print $1,"vert",$1,$1/10,"horiz",5-$1,$1-$1/5,$1+$1/20}'}, @@ -171,6 +176,13 @@ tryplot( testname => 'Error bars (using rangesize, rangesizeall)', qw(--xmin 1 --xmax 5 --ymin 0.5 --ymax 5.5)], refplot => 'error-bars-using-rangesize-rangesizeall.ref' ); +tryplot( testname => 'Error bars (using tuplesize, tuplesizeall)', + cmd => q{seq 5 | gawk '{print $1,"vert",$1,$1/10,"horiz",5-$1,$1-$1/5,$1+$1/20}'}, + options => [qw(--domain --dataid), + qw(--tuplesize vert 3 --tuplesizeall 4 --with xerrorbars --style vert), 'with errorbars', + qw(--xmin 1 --xmax 5 --ymin 0.5 --ymax 5.5)], + refplot => 'error-bars-using-tuplesize-tuplesizeall.ref' ); + SKIP: {