@@ -15,12 +15,12 @@ class BarplotTest < Test::Unit::TestCase
1515 test ( "colored" ) do
1616 data = { bar : 23 , foo : 37 }
1717 plot = UnicodePlot . barplot ( data : data )
18- _ , output = with_term { plot . render ( $stdout) }
18+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
1919 assert_equal ( fixture_path ( "barplot/default.txt" ) . read ,
2020 output )
2121
2222 plot = UnicodePlot . barplot ( [ :bar , :foo ] , [ 23 , 37 ] )
23- _ , output = with_term { plot . render ( $stdout) }
23+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
2424 assert_equal ( fixture_path ( "barplot/default.txt" ) . read ,
2525 output )
2626 end
@@ -40,7 +40,7 @@ class BarplotTest < Test::Unit::TestCase
4040 test ( "mixed" ) do
4141 data = { bar : 23.0 , 2.1 => 10 , foo : 37.0 }
4242 plot = UnicodePlot . barplot ( data : data )
43- _ , output = with_term { plot . render ( $stdout) }
43+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
4444 assert_equal ( fixture_path ( "barplot/default_mixed.txt" ) . read ,
4545 output )
4646 end
@@ -53,7 +53,7 @@ class BarplotTest < Test::Unit::TestCase
5353 title : "Logscale Plot" ,
5454 xscale : :log10
5555 )
56- _ , output = with_term { plot . render ( $stdout) }
56+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
5757 assert_equal ( fixture_path ( "barplot/log10.txt" ) . read ,
5858 output )
5959 end
@@ -66,7 +66,7 @@ class BarplotTest < Test::Unit::TestCase
6666 xlabel : "custom label" ,
6767 xscale : :log10
6868 )
69- _ , output = with_term { plot . render ( $stdout) }
69+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
7070 assert_equal ( fixture_path ( "barplot/log10_label.txt" ) . read ,
7171 output )
7272 end
@@ -83,7 +83,7 @@ class BarplotTest < Test::Unit::TestCase
8383 margin : 7 ,
8484 padding : 3
8585 )
86- _ , output = with_term { plot . render ( $stdout) }
86+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
8787 assert_equal ( fixture_path ( "barplot/parameters1.txt" ) . read ,
8888 output )
8989 end
@@ -99,7 +99,7 @@ class BarplotTest < Test::Unit::TestCase
9999 padding : 3 ,
100100 labels : false
101101 )
102- _ , output = with_term { plot . render ( $stdout) }
102+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
103103 assert_equal ( fixture_path ( "barplot/parameters1_nolabels.txt" ) . read ,
104104 output )
105105 end
@@ -115,29 +115,29 @@ class BarplotTest < Test::Unit::TestCase
115115 symbol : "=" ,
116116 width : 60
117117 )
118- _ , output = with_term { plot . render ( $stdout) }
118+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
119119 assert_equal ( fixture_path ( "barplot/parameters2.txt" ) . read ,
120120 output )
121121 end
122122 end
123123
124124 test ( "ranges" ) do
125125 plot = UnicodePlot . barplot ( 2 ..6 , 11 ..15 )
126- _ , output = with_term { plot . render ( $stdout) }
126+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
127127 assert_equal ( fixture_path ( "barplot/ranges.txt" ) . read ,
128128 output )
129129 end
130130
131131 test ( "all zeros" ) do
132132 plot = UnicodePlot . barplot ( [ 5 , 4 , 3 , 2 , 1 ] , [ 0 , 0 , 0 , 0 , 0 ] )
133- _ , output = with_term { plot . render ( $stdout) }
133+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
134134 assert_equal ( fixture_path ( "barplot/edgecase_zeros.txt" ) . read ,
135135 output )
136136 end
137137
138138 test ( "one large" ) do
139139 plot = UnicodePlot . barplot ( [ :a , :b , :c , :d ] , [ 1 , 1 , 1 , 1000000 ] )
140- _ , output = with_term { plot . render ( $stdout) }
140+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
141141 assert_equal ( fixture_path ( "barplot/edgecase_onelarge.txt" ) . read ,
142142 output )
143143 end
@@ -159,21 +159,21 @@ class BarplotTest < Test::Unit::TestCase
159159 plot = UnicodePlot . barplot ( [ :bar , :foo ] , [ 23 , 37 ] )
160160 assert_same ( plot ,
161161 UnicodePlot . barplot! ( plot , [ "zoom" ] , [ 90 ] ) )
162- _ , output = with_term { plot . render ( $stdout) }
162+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
163163 assert_equal ( fixture_path ( "barplot/default2.txt" ) . read ,
164164 output )
165165
166166 plot = UnicodePlot . barplot ( [ :bar , :foo ] , [ 23 , 37 ] )
167167 assert_same ( plot ,
168168 UnicodePlot . barplot! ( plot , "zoom" , 90 ) )
169- _ , output = with_term { plot . render ( $stdout) }
169+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
170170 assert_equal ( fixture_path ( "barplot/default2.txt" ) . read ,
171171 output )
172172
173173 plot = UnicodePlot . barplot ( [ :bar , :foo ] , [ 23 , 37 ] )
174174 assert_same ( plot ,
175175 UnicodePlot . barplot! ( plot , data : { zoom : 90 } ) )
176- _ , output = with_term { plot . render ( $stdout) }
176+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
177177 assert_equal ( fixture_path ( "barplot/default2.txt" ) . read ,
178178 output )
179179 end
@@ -182,7 +182,7 @@ class BarplotTest < Test::Unit::TestCase
182182 plot = UnicodePlot . barplot ( 2 ..6 , 11 ..15 )
183183 assert_same ( plot ,
184184 UnicodePlot . barplot! ( plot , 9 ..10 , 20 ..21 ) )
185- _ , output = with_term { plot . render ( $stdout) }
185+ _ , output = with_term { plot . render ( $stdout, newline : false ) }
186186 assert_equal ( fixture_path ( "barplot/ranges2.txt" ) . read ,
187187 output )
188188 end
0 commit comments