Mercurial > hg > soundsoftware-site
diff test/unit/lib/redmine/unified_diff_test.rb @ 929:5f33065ddc4b redmine-1.3
Update to Redmine SVN rev 9414 on 1.3-stable branch
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 14:54:18 +0100 |
parents | cbb26bc654de |
children | 433d4f72a19b |
line wrap: on
line diff
--- a/test/unit/lib/redmine/unified_diff_test.rb Fri Feb 24 19:09:32 2012 +0000 +++ b/test/unit/lib/redmine/unified_diff_test.rb Wed Jun 27 14:54:18 2012 +0100 @@ -91,6 +91,29 @@ end + def test_partials_with_html_entities + raw = <<-DIFF +--- test.orig.txt Wed Feb 15 16:10:39 2012 ++++ test.new.txt Wed Feb 15 16:11:25 2012 +@@ -1,5 +1,5 @@ + Semicolons were mysteriously appearing in code diffs in the repository + +-void DoSomething(std::auto_ptr<MyClass> myObj) ++void DoSomething(const MyClass& myObj) + +DIFF + + diff = Redmine::UnifiedDiff.new(raw, :type => 'sbs') + assert_equal 1, diff.size + assert_equal 'void DoSomething(<span>std::auto_ptr<MyClass></span> myObj)', diff.first[2].html_line_left + assert_equal 'void DoSomething(<span>const MyClass&</span> myObj)', diff.first[2].html_line_right + + diff = Redmine::UnifiedDiff.new(raw, :type => 'inline') + assert_equal 1, diff.size + assert_equal 'void DoSomething(<span>std::auto_ptr<MyClass></span> myObj)', diff.first[2].html_line + assert_equal 'void DoSomething(<span>const MyClass&</span> myObj)', diff.first[3].html_line + end + def test_line_starting_with_dashes diff = Redmine::UnifiedDiff.new(<<-DIFF --- old.txt Wed Nov 11 14:24:58 2009