OSDN Git Service

scm: cvs: fix unit model cat test fails on Windows.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 12 Apr 2011 12:24:43 +0000 (12:24 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 12 Apr 2011 12:24:43 +0000 (12:24 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5440 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_cvs_test.rb

index a8fc7d3..c0f4a9a 100644 (file)
@@ -122,12 +122,14 @@ class RepositoryCvsTest < ActiveSupport::TestCase
       assert buf
       lines = buf.split("\n")
       assert_equal 2, lines.length
-      assert_equal 'with one change', lines[1]
+      buf = lines[1].gsub(/\r$/, "")
+      assert_equal 'with one change', buf
       buf = @repository.cat('README', '1')
       assert buf
       lines = buf.split("\n")
       assert_equal 1, lines.length
-      assert_equal 'CVS test repository', lines[0]
+      buf = lines[0].gsub(/\r$/, "")
+      assert_equal 'CVS test repository', buf
       assert_nil @repository.cat('missing.rb')
 
       # sources/welcome_controller.rb is removed at revision 5.