@@ -143,17 +143,13 class RepositorySubversionTest < ActiveSupport::TestCase | |||
|
143 | 143 | s1 = "\xC2\x80" |
|
144 | 144 | s2 = "\xc3\x82\xc2\x80" |
|
145 | 145 | if s1.respond_to?(:force_encoding) |
|
146 | s3 = s1 | |
|
147 | s4 = s2 | |
|
148 | s1.force_encoding('ASCII-8BIT') | |
|
149 | s2.force_encoding('ASCII-8BIT') | |
|
150 | s3.force_encoding('ISO-8859-1') | |
|
151 | s4.force_encoding('UTF-8') | |
|
152 | assert_equal s3.encode('UTF-8'), s4 | |
|
146 | s1.force_encoding('ISO-8859-1') | |
|
147 | s2.force_encoding('UTF-8') | |
|
148 | assert_equal s1.encode('UTF-8'), s2 | |
|
153 | 149 | end |
|
154 | 150 | c = Changeset.new(:repository => @repository, |
|
155 | :comments=>s2, | |
|
156 | :revision=>'123', | |
|
151 | :comments => s2, | |
|
152 | :revision => '123', | |
|
157 | 153 | :committed_on => Time.now) |
|
158 | 154 | assert c.save |
|
159 | 155 | assert_equal s2, c.comments |
General Comments 0
You need to be logged in to leave comments.
Login now