Skip to content

Commit c8bdafe

Browse files
committed
Add encoding test
1 parent 161c850 commit c8bdafe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/fixtures/iris_utf16.csv

9 KB
Binary file not shown.

test/youplot/iris_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,10 @@ def fixture(fname)
147147
assert_equal '', @stderr_file.read
148148
assert_equal '', @stdout_file.read
149149
end
150+
151+
test :encoding do
152+
$stdin = File.open(File.expand_path('../fixtures/iris_utf16.csv', __dir__), 'r')
153+
YouPlot::Command.new(['s', '--encoding', 'UTF-16', '-H', '-d,', '-t', 'IRIS-SCATTER']).run
154+
assert_equal fixture('iris-scatter.txt'), @stderr_file.read
155+
end
150156
end

0 commit comments

Comments
 (0)