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