Add tests for border options

This commit is contained in:
kojix2 2021-01-21 19:48:43 +09:00
parent 58f6580e3f
commit 6f8f9275d2
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,18 @@
┌ ┐
50 ┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⡸
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢇⠀⠀⠀⠀⠀⠀⠀⡇
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢇⠀⠀⠀⠀⠀⠀⠀⡎⢸⠀⠀⠀⠀⠀⠀⢠⠃
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⡜⢸⠀⠀⠀⠀⠀⠀⢠⠃⠈⡆⠀⠀⠀⠀⠀⢸⠀
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⠸⡀⠀⠀⠀⠀⠀⢠⠃⠀⡇⠀⠀⠀⠀⠀⢸⠀⠀⢇⠀⠀⠀⠀⠀⡎⠀
┤⠀⠀⠀⡠⠳⡀⠀⠀⠀⠀⠀⢠⠃⠀⢣⠀⠀⠀⠀⠀⡜⠀⠀⢱⠀⠀⠀⠀⠀⡇⠀⠀⢸⠀⠀⠀⠀⠀⡇⠀
┤⠤⢤⠼⠤⠤⠵⡤⠤⠤⠤⢤⠧⠤⠤⠼⡤⠤⠤⠤⢤⠧⠤⠤⠬⡦⠤⠤⠤⢴⠥⠤⠤⠬⡦⠤⠤⠤⢼⠤⠤
┤⡠⠃⠀⠀⠀⠀⠱⡀⠀⠀⡜⠀⠀⠀⠀⢱⠀⠀⠀⡸⠀⠀⠀⠀⢣⠀⠀⠀⡸⠀⠀⠀⠀⡇⠀⠀⠀⡜⠀⠀
┤⠁⠀⠀⠀⠀⠀⠀⠱⡀⡰⠁⠀⠀⠀⠀⠀⡇⠀⢀⠇⠀⠀⠀⠀⠸⡀⠀⠀⡇⠀⠀⠀⠀⢸⠀⠀⠀⡇⠀⠀
┤⠀⠀⠀⠀⠀⠀⠀⠀⠱⠃⠀⠀⠀⠀⠀⠀⠸⡀⡸⠀⠀⠀⠀⠀⠀⢇⠀⢸⠀⠀⠀⠀⠀⠘⡄⠀⢰⠁⠀⠀
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢇⠇⠀⠀⠀⠀⠀⠀⢸⠀⡎⠀⠀⠀⠀⠀⠀⡇⠀⢸⠀⠀⠀
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⣇⠇⠀⠀⠀⠀⠀⠀⢸⠀⡇⠀⠀⠀
┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠀⠀⠀⠀⠀⠀⠀⠘⣄⠇⠀⠀⠀
-50 ┤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀
└ ┘
1 10

View File

@ -0,0 +1,18 @@
┌ ┐
50 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⡸
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢇⠀⠀⠀⠀⠀⠀⠀⡇
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢇⠀⠀⠀⠀⠀⠀⠀⡎⢸⠀⠀⠀⠀⠀⠀⢠⠃
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⡜⢸⠀⠀⠀⠀⠀⠀⢠⠃⠈⡆⠀⠀⠀⠀⠀⢸⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡸⠸⡀⠀⠀⠀⠀⠀⢠⠃⠀⡇⠀⠀⠀⠀⠀⢸⠀⠀⢇⠀⠀⠀⠀⠀⡎⠀
⠀⠀⠀⡠⠳⡀⠀⠀⠀⠀⠀⢠⠃⠀⢣⠀⠀⠀⠀⠀⡜⠀⠀⢱⠀⠀⠀⠀⠀⡇⠀⠀⢸⠀⠀⠀⠀⠀⡇⠀
⠤⢤⠼⠤⠤⠵⡤⠤⠤⠤⢤⠧⠤⠤⠼⡤⠤⠤⠤⢤⠧⠤⠤⠬⡦⠤⠤⠤⢴⠥⠤⠤⠬⡦⠤⠤⠤⢼⠤⠤
⡠⠃⠀⠀⠀⠀⠱⡀⠀⠀⡜⠀⠀⠀⠀⢱⠀⠀⠀⡸⠀⠀⠀⠀⢣⠀⠀⠀⡸⠀⠀⠀⠀⡇⠀⠀⠀⡜⠀⠀
⠁⠀⠀⠀⠀⠀⠀⠱⡀⡰⠁⠀⠀⠀⠀⠀⡇⠀⢀⠇⠀⠀⠀⠀⠸⡀⠀⠀⡇⠀⠀⠀⠀⢸⠀⠀⠀⡇⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠱⠃⠀⠀⠀⠀⠀⠀⠸⡀⡸⠀⠀⠀⠀⠀⠀⢇⠀⢸⠀⠀⠀⠀⠀⠘⡄⠀⢰⠁⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢇⠇⠀⠀⠀⠀⠀⠀⢸⠀⡎⠀⠀⠀⠀⠀⠀⡇⠀⢸⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⣇⠇⠀⠀⠀⠀⠀⠀⢸⠀⡇⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠀⠀⠀⠀⠀⠀⠀⠘⣄⠇⠀⠀⠀
-50 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀
└ ┘
1 10

View File

@ -202,4 +202,14 @@ class YouPlotSimpleTest < Test::Unit::TestCase
YouPlot::Command.new(['line', '--padding', '17']).run
assert_equal fixture('simple-lineplot-padding-17.txt'), @stderr_file.read
end
test :line_border_corners do
YouPlot::Command.new(['line', '--border', 'corners']).run
assert_equal fixture('simple-lineplot-border-corners.txt'), @stderr_file.read
end
test :line_border_barplot do
YouPlot::Command.new(['line', '--border', 'barplot']).run
assert_equal fixture('simple-lineplot-border-barplot.txt'), @stderr_file.read
end
end