File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 63
63
end
64
64
end
65
65
66
+ it 'should always return unfrozen Strings' do
67
+ TEST_CASES . each_pair do |input , encoded |
68
+ assert_equal false , Ascii85 . encode ( input ) . frozen?
69
+ end
70
+ end
71
+
66
72
it 'should encode Strings in different encodings correctly' do
67
73
input_euc_jp = 'どうもありがとうミスターロボット' . encode ( 'EUC-JP' )
68
74
input_binary = input_euc_jp . force_encoding ( 'ASCII-8BIT' )
143
149
end
144
150
end
145
151
152
+ it 'should always return unfrozen Strings' do
153
+ TEST_CASES . each_pair do |input , encoded |
154
+ assert_equal false , Ascii85 . decode ( encoded ) . frozen?
155
+ end
156
+ end
157
+
146
158
it 'should accept valid input in encodings other than the default' do
147
159
input = 'Ragnarök τέχνη русский язык I ♥ Ruby'
148
160
input_ascii85 = Ascii85 . encode ( input )
221
233
end
222
234
end
223
235
236
+ it 'should always return unfrozen Strings' do
237
+ TEST_CASES . each_pair do |decoded , input |
238
+ raw_input = input [ 2 ...-2 ] # Remove '<~' and '~>'
239
+ assert_equal false , Ascii85 . decode_raw ( raw_input ) . frozen?
240
+ end
241
+ end
242
+
224
243
it 'should decode from an IO object' do
225
244
input = StringIO . new ( ';KZGo' )
226
245
result = Ascii85 . decode_raw ( input )
You can’t perform that action at this time.
0 commit comments