Decode hexadecimal-encoded literals in order to be frozen string literals friendly (#31004).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17991 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2019-03-19 15:43:55 +00:00
parent 7d2f10ccac
commit 26509e7f4c
31 changed files with 143 additions and 218 deletions

View File

@@ -60,13 +60,12 @@ class RepositoryTest < ActiveSupport::TestCase
def test_blank_log_encoding_error_message_fr
set_language_if_valid 'fr'
str = "Encodage des messages de commit doit \xc3\xaatre renseign\xc3\xa9(e)".force_encoding('UTF-8')
repo = Repository::Bazaar.new(
:project => Project.find(3),
:url => "/test"
)
assert !repo.save
assert_include str, repo.errors.full_messages
assert_include 'Encodage des messages de commit doit être renseigné(e)', repo.errors.full_messages
end
def test_create
@@ -287,7 +286,7 @@ class RepositoryTest < ActiveSupport::TestCase
:url => '/foo/bar/baz' )
long_whitespace = " "
expected_comment = "This is a loooooooooooooooooooooooooooong comment"
comment = "#{expected_comment}#{long_whitespace}\n"
comment = +"#{expected_comment}#{long_whitespace}\n"
3.times {comment << "#{long_whitespace}\n"}
changeset = Changeset.new(
:comments => comment, :commit_date => Time.now,