Fixed: wrong digest for text files under Windows (#2264).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2085 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-02 17:57:13 +00:00
parent 218e1bb267
commit 93c04f2666
3 changed files with 16 additions and 3 deletions
+2 -1
View File
@@ -1 +1,2 @@
this is a text file for upload tests
this is a text file for upload tests
with multiple lines
+6 -1
View File
@@ -18,7 +18,8 @@
require File.dirname(__FILE__) + '/../test_helper'
class AttachmentTest < Test::Unit::TestCase
fixtures :issues, :users
def setup
end
@@ -29,4 +30,8 @@ class AttachmentTest < Test::Unit::TestCase
assert_equal 'f8139524ebb8f32e51976982cd20a85d', Attachment.disk_filename("test_accentué")[13..-1]
assert_equal 'cbb5b0f30978ba03731d61f9f6d10011', Attachment.disk_filename("test_accentué.ça")[13..-1]
end
def test_digest
assert_equal '1478adae0d4eb06d35897518540e25d6', Attachment.digest(Test::Unit::TestCase.fixture_path + "/files/testfile.txt")
end
end