mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Add xlim ylim tests for lineplot
This commit is contained in:
parent
c4a726fd08
commit
f18c72228c
18
test/fixtures/simple-lineplot-xlim--1-5-ylim--25-50.txt
vendored
Normal file
18
test/fixtures/simple-lineplot-xlim--1-5-ylim--25-50.txt
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
┌────────────────────────────────────────┐
|
||||
50 │⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢳⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠇⠈⡆⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⠸⡀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⠁⠀⠀⢣⠀⠀⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀⠀⢣⠀⠀⠀⠀│
|
||||
│⠉⠉⠉⠉⠉⠉⢹⠉⠉⠉⠉⠉⠉⠉⠉⡩⠋⠉⠉⠉⠉⠉⠹⡉⠉⠉⠉⠉⠉⡹⠉⠉⠉⠉⠉⠉⡏⠉⠉⠉│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⢀⠜⠀⠀⠀⠀⠀⠀⠀⠀⠱⡀⠀⠀⠀⢰⠁⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⡄⠀⢠⠃⠀⠀⠀⠀⠀⠀⠀⠀⢣⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣄⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⠀│
|
||||
-25 │⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀│
|
||||
└────────────────────────────────────────┘
|
||||
-1 5
|
18
test/fixtures/simple-lineplot-xlim--1-5.txt
vendored
Normal file
18
test/fixtures/simple-lineplot-xlim--1-5.txt
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
┌────────────────────────────────────────┐
|
||||
50 │⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⠀⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠜⠈⡆⠀⠀⠀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠊⠣⡀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠎⠀⠀⠘⡄⠀⠀⠀⠀│
|
||||
│⠤⠤⠤⠤⠤⠤⢼⠤⠤⠤⠤⠤⠤⠤⠤⢤⠴⠥⠤⠤⠤⠵⢤⠤⠤⠤⠤⠤⠤⢤⠮⠤⠤⠤⠤⠼⡤⠤⠤⠤│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⢠⠃⠀⠀⠀⠀⠀⠀⠱⡀⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠀⢠⠃⠀⠀⠀⠀⠀⠀⠀⠀⢱⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠲⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈│
|
||||
│⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
-50 │⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
|
||||
└────────────────────────────────────────┘
|
||||
-1 5
|
18
test/fixtures/simple-lineplot-ylim--25-50.txt
vendored
Normal file
18
test/fixtures/simple-lineplot-ylim--25-50.txt
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
┌────────────────────────────────────────┐
|
||||
50 │⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡇⠀⠀⠀⠀⠀⠀⠀⡜│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢇⠀⠀⠀⠀⠀⠀⠀⡇│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡇⠀⠀⠀⠀⠀⠀⠀⡎⢸⠀⠀⠀⠀⠀⠀⢀⠇│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢸⠀⠀⠀⠀⠀⠀⠀⡇⠸⡀⠀⠀⠀⠀⠀⢸⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢧⠀⠀⠀⠀⠀⠀⠀⡇⠘⡄⠀⠀⠀⠀⠀⢸⠀⠀⡇⠀⠀⠀⠀⠀⢸⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⠸⡀⠀⠀⠀⠀⠀⢠⠃⠀⡇⠀⠀⠀⠀⠀⢸⠀⠀⢇⠀⠀⠀⠀⠀⡇⠀│
|
||||
│⠀⠀⠀⢠⠳⡀⠀⠀⠀⠀⠀⢠⠃⠀⢇⠀⠀⠀⠀⠀⡸⠀⠀⢱⠀⠀⠀⠀⠀⡇⠀⠀⢸⠀⠀⠀⠀⠀⡇⠀│
|
||||
│⠀⠀⡠⠃⠀⢣⠀⠀⠀⠀⠀⡜⠀⠀⢸⠀⠀⠀⠀⠀⡇⠀⠀⠸⡀⠀⠀⠀⢀⠇⠀⠀⠸⡀⠀⠀⠀⢰⠁⠀│
|
||||
│⠉⡹⠉⠉⠉⠉⡏⠉⠉⠉⢹⠉⠉⠉⠉⡏⠉⠉⠉⢹⠉⠉⠉⠉⡏⠉⠉⠉⢹⠉⠉⠉⠉⡏⠉⠉⠉⢹⠉⠉│
|
||||
│⡰⠁⠀⠀⠀⠀⠘⡄⠀⠀⡎⠀⠀⠀⠀⢸⠀⠀⠀⡜⠀⠀⠀⠀⢱⠀⠀⠀⡜⠀⠀⠀⠀⢇⠀⠀⠀⡜⠀⠀│
|
||||
│⠁⠀⠀⠀⠀⠀⠀⢱⠀⢰⠁⠀⠀⠀⠀⠈⡆⠀⢀⠇⠀⠀⠀⠀⢸⠀⠀⠀⡇⠀⠀⠀⠀⢸⠀⠀⠀⡇⠀⠀│
|
||||
│⠀⠀⠀⠀⠀⠀⠀⠀⢣⡇⠀⠀⠀⠀⠀⠀⢱⠀⢸⠀⠀⠀⠀⠀⠀⡇⠀⢰⠁⠀⠀⠀⠀⠸⡀⠀⢀⠇⠀⠀│
|
||||
-25 │⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠘⡄⡎⠀⠀⠀⠀⠀⠀⢣⠀⣸⠀⠀⠀⠀⠀⠀⡇⠀⢸⠀⠀⠀│
|
||||
└────────────────────────────────────────┘
|
||||
1 10
|
@ -242,4 +242,22 @@ class YouPlotSimpleTest < Test::Unit::TestCase
|
||||
YouPlot::Command.new(['hist', '--symbol', '@']).run
|
||||
assert_equal fixture('simple-histogram-symbol-@.txt'), @stderr_file.read
|
||||
end
|
||||
|
||||
test :line_xlim do
|
||||
YouPlot::Command.new(['line', '--xlim', '-1,5']).run
|
||||
assert_equal fixture('simple-lineplot-xlim--1-5.txt'), @stderr_file.read
|
||||
end
|
||||
|
||||
test :line_ylim do
|
||||
YouPlot::Command.new(['line', '--ylim', '-25,50']).run
|
||||
assert_equal fixture('simple-lineplot-ylim--25-50.txt'), @stderr_file.read
|
||||
end
|
||||
|
||||
|
||||
test :xlim_and_ylim do
|
||||
YouPlot::Command.new(['line', '--xlim', '-1,5', '--ylim', '-25,50']).run
|
||||
assert_equal fixture('simple-lineplot-xlim--1-5-ylim--25-50.txt'), @stderr_file.read
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user