]> source.dussan.org Git - redmine.git/commitdiff
scm: bazaar: add diff test to unit lib test
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 16 Sep 2012 08:50:55 +0000 (08:50 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 16 Sep 2012 08:50:55 +0000 (08:50 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10389 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb

index aee0fddef40ca7eda10903d9739588edda6f0842..3752caf068afc47ba792cc2b40b055bd768a780a 100644 (file)
@@ -52,6 +52,13 @@ begin
         assert_nil @adapter.cat('doc-mkdir.txt', '12345678')
       end
 
+      def test_diff
+        diff1 = @adapter.diff('doc-mkdir.txt', 3, 2)
+        assert_equal 21, diff1.size
+        buf =  diff1[14].gsub(/\r\n|\r|\n/, "")
+        assert_equal "-Display more information.", buf
+      end
+
       def test_diff_path_invalid
         assert_equal [], @adapter.diff('invalid', 1)
       end