Skip to content

Commit

Permalink
Revert "Tweak this spec to run all encodings and skip dummies."
Browse files Browse the repository at this point in the history
This reverts commit 1dbeb43.
  • Loading branch information
headius committed Mar 16, 2015
1 parent f2b373b commit c19cc44
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions spec/regression/GH-1675_casecmp_on_UTF16LE_encoded_string_spec.rb
Expand Up @@ -3,11 +3,16 @@
describe 'String#casecmp' do
it 'returns correct value' do
Encoding.name_list.each do |enc_name|
enc = Encoding.find(enc_name)
next if !enc || enc.dummy?
a = 'ABC'.encode(enc)
b = 'ABC'.encode(enc)
b.casecmp(a).should == 0
if (enc_name != "UTF-7") && (enc_name != "CP65000")
# this condition statement escape the following error:
# Encoding::ConverterNotFoundError:
# code converter not found for UTF-7

# using "UTF-16LE", "UTF-8", "Shift_JIS", and other available encodings
a = 'ABC'.encode(enc_name)
b = 'ABC'.encode(enc_name)
b.casecmp(a).should be_true
end
end
end
end
Expand Down

0 comments on commit c19cc44

Please sign in to comment.