Defect #29512

Test failures with in development mode

Added by Liane Hampe over 4 years ago. Updated 11 months ago.

Status:ConfirmedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:3.4.6


Dear Redmine Team,

I experianced some test failures with the unzipped download.

The failures refer to the test cases i) attachments_visibility_test.rb and ii) unified_diff.rb.

After analysing the problems I found out that the origin of the failures is in the test files which come along with the test cases, i.e., test/fixtures/files and test/fixtures/diffs.

The unzipped version of redmine-3.4.6 has not the same files than the same redmine version checked out from repo. Some of the files in the mentioned folders have a larger size. This causes tests asking for the file size to fail as in test case i) and makes problems when running tests of test case ii). The failures of test case ii) refer to additonal carriage return characters such that \r. Therefore, the string comparison in ii) fails.

Of course for production it doesn't matter. Nevertheless, I thought you are interested in knowing about this issue.

Best Regards,

Liane Hampe

Redmine version 3.4.6.stable
Ruby version 2.4.4-p296 (2018-03-28) [x86_64-linux]
Rails version 4.2.8
Environment development
Database adapter Mysql2
Database manager version Mysql 5.7.23
Subversion 1.9.7
Git 2.17.1
Redmine plugins:
no plugin installed


#1 Updated by Go MAEDA 11 months ago

  • Status changed from New to Confirmed

The latest still has the problem. This is due to the difference in newline characters. The newline of files checked out from the repository and in redmine-*.tar.gz is LF (\n), while the newline of files in is CR+LF (\r\n).

Redmine::UnifiedDiffTest#test_offset_range_japanese_1 [test/unit/lib/redmine/unified_diff_test.rb:327]:
Expected: "日本<span></span>" 
  Actual: "日本<span></span>\r" 

bin/rails test test/unit/lib/redmine/unified_diff_test.rb:319

Also available in: Atom PDF