added --using, --usingall

This commit is contained in:
Dima Kogan
2021-03-11 13:46:26 -08:00
parent 83139d7ad0
commit d68b331af6
6 changed files with 219 additions and 26 deletions

View File

@@ -39,7 +39,7 @@ BEGIN {
}
}
use Test::More tests => 88;
use Test::More tests => 92;
use File::Temp 'tempfile';
use IPC::Run 'run';
use String::ShellQuote;
@@ -298,6 +298,21 @@ tryplot( testname => 'every-individual',
options => [qw(--points --every 0 2 --every 1 3)],
refplot => 'every-individual.ref' );
tryplot( testname => 'usingall',
cmd => q{seq 12 | gawk '{print $1,$1+1}'},
options => [qw(--style 0), 'with points pt variable',
qw(--style 1), 'with linespoints pt variable',
qw(--usingall 1:2:($2) --unset grid)],
refplot => 'usingall.ref' );
tryplot( testname => 'using-individual',
cmd => q{seq 12 | gawk '{print $1,$1+1}'},
options => [qw(--style 0), 'with points pt variable',
qw(--using 0 1:2:($2)),
qw(--using 1 1:(12-$2)),
qw(--unset grid)],
refplot => 'using-individual.ref' );
SKIP:
{

39
t/using-individual.ref Normal file
View File

@@ -0,0 +1,39 @@
12 +------------------------------------------------------------------------------------------+
| + + + + + |
| |
| K |
| |
10 |-+ B J +-|
| |
| |
| B I |
| |
8 |-+ B H +-|
| |
| |
| B G |
| |
6 |-+ B F +-|
| |
| |
| E B |
| |
| |
4 |-+ D B +-|
| |
| C B |
| |
| |
2 |-+ B B +-|
| |
| A B |
| |
| |
0 |-+ B +-|
| |
| |
| |
| + + + + + |
-2 +------------------------------------------------------------------------------------------+
0 2 4 6 8 10 12

39
t/usingall.ref Normal file
View File

@@ -0,0 +1,39 @@
14 +------------------------------------------------------------------------------------------+
| + + + + + |
| |
| ##|
| #### |
12 |-+ #L# +-|
| ## |
| ## |
| ##K# K |
| #### |
10 |-+ #J# J +-|
| ## |
| ## |
| ##I# I |
| #### |
8 |-+ #H# H +-|
| ## |
| ## |
| #G# G |
| ### |
| ## |
6 |-+ ##F# F +-|
| #### |
| #E# E |
| ## |
| ## |
4 |-+ ##D# D +-|
| #### |
| #C# C |
| ## |
| ## |
2 |-+ B# B +-|
| |
| A |
| |
| + + + + + |
0 +------------------------------------------------------------------------------------------+
0 2 4 6 8 10 12