diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-05 04:22:49 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-05 04:22:49 +0000 |
commit | 6f4461830c9a0bea1c976e820d38b0aa2ac7eae4 (patch) | |
tree | de9953186e8b86e47c241dd2ba3d22d722d911df | |
parent | 86d9ea32dbd253607bfaa221e2924c95fcff8020 (diff) | |
download | redmine-6f4461830c9a0bea1c976e820d38b0aa2ac7eae4.tar.gz redmine-6f4461830c9a0bea1c976e820d38b0aa2ac7eae4.zip |
scm: fix invalid UTF-8 tests fail on Windows Ruby 1.8.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5648 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/unit/changeset_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb index 242e57012..a433a8584 100644 --- a/test/unit/changeset_test.rb +++ b/test/unit/changeset_test.rb @@ -260,7 +260,7 @@ class ChangesetTest < ActiveSupport::TestCase proj = Project.find(3) # str = File.read("#{RAILS_ROOT}/test/fixtures/encoding/iso-8859-1.txt") str1 = "Texte encod\xe9 en ISO-8859-1." - str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e" + str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e test" str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) r = Repository::Bazaar.create!( @@ -276,7 +276,7 @@ class ChangesetTest < ActiveSupport::TestCase :committer => str2) assert( c.save ) assert_equal "Texte encod? en ISO-8859-1.", c.comments - assert_equal "?a?b?c?d?e", c.committer + assert_equal "?a?b?c?d?e test", c.committer end def test_invalid_utf8_sequences_in_comments_should_be_replaced_ja_jis @@ -329,7 +329,7 @@ class ChangesetTest < ActiveSupport::TestCase def test_invalid_utf8_sequences_in_paths_should_be_replaced proj = Project.find(3) str1 = "Texte encod\xe9 en ISO-8859-1" - str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e" + str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e test" str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) r = Repository::Bazaar.create!( @@ -352,7 +352,7 @@ class ChangesetTest < ActiveSupport::TestCase :from_revision => "345") assert( ch.save ) assert_equal "Texte encod? en ISO-8859-1", ch.path - assert_equal "?a?b?c?d?e", ch.from_path + assert_equal "?a?b?c?d?e test", ch.from_path end def test_comments_nil |