This project is archived and is in readonly mode.

#4701 ✓committed
Rohit Arondekar

ActionPack, 1.9.2-head 3 failing tests regarding encodings

Reported by Rohit Arondekar | May 26th, 2010 @ 07:19 AM | in 3.0.2

Rails Master ActionPack, ruby 1.9.2dev (2010-05-08 trunk 27665) [x86_64-linux] has 3 failing tests.

The stacktrace is as follows:

1) Failure: (TextHelperTest) [test/template/text_helper_test.rb:221]: <"...\x83ciency could not be..."> expected but was
<"...fficiency could not be...">.

2) Failure: test_truncate_multibyte(TextHelperTest) [test/template/text_helper_test.rb:87]:
<"\xEC\x95\x88\xEB\x85\x95\xED..."> expected but was
<"안녕하세요">.

3) Failure: test_scoping_by_partial_of_an_array(TranslationHelperTest) [test/template/translation_helper_test.rb:41]:
<"foobar"> expected but was
<"["foo", "bar"]">.

2704 tests, 11359 assertions, 3 failures, 0 errors, 0 skips

Note: It's best to run the tests yourself, because I don't think some of the chars got copied from my terminal properly.

Regarding the first 2 failures, it happens when force_encoding is not used.

The failing assert is as follows:

assert_equal("...\203ciency could not be...", excerpt("That's why e\357\254\203ciency could not be helped", 'could', 8))

Note that:

"...\203ciency could not be...".encoding => ASCII-8BIT excerpt("That's why e\357\254\203ciency could not be helped", 'could', 8).encoding => UTF-8

Similarly the 2nd test. I'm looking into the 3rd test now.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages