[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Ruby binding core test mods to pass Windows line endings

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2006-12-31 20:33:53 CET

Hiya,

Not sure this is the best approach to take, but its working here.

--
Joe Swatosh
[[[
* subversion/bindings/swig/ruby/test/test_core.rb
  Change "\n" to "\r\n" in the expected strings when running on
windows platform.
]]]
Index: subversion/bindings/swig/ruby/test/test_core.rb
===================================================================
--- subversion/bindings/swig/ruby/test/test_core.rb     (revision 22844)
+++ subversion/bindings/swig/ruby/test/test_core.rb     (working copy)
@@ -359,6 +359,7 @@
 +
 + c
 EOD
+    expected.gsub!("\n", "\r\n") if
/cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
     diff = Svn::Core::Diff.file_diff(original.path, modified.path)
     assert_equal(expected, diff.unified(original_header, modified_header))
@@ -373,6 +374,7 @@
 +
    c
 EOD
+    expected.gsub!("\n", "\r\n") if
/cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
     diff = Svn::Core::Diff.file_diff(original.path, modified.path, options)
     assert_equal(expected, diff.unified(original_header, modified_header))
@@ -386,6 +388,7 @@
 +
    c
 EOD
+    expected.gsub!("\n", "\r\n") if
/cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
     diff = Svn::Core::Diff.file_diff(original.path, modified.path, options)
     assert_equal(expected, diff.unified(original_header, modified_header))
   end
@@ -433,6 +436,7 @@
 d
  e
 EOD
+    expected.gsub!("\n", "\r\n") if
/cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
     diff = Svn::Core::Diff.file_diff3(original.path,
                                       modified.path,
                                       latest.path)
@@ -446,6 +450,7 @@
 d
  e
 EOD
+    expected.gsub!("\n", "\r\n") if
/cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
     diff = Svn::Core::Diff.file_diff3(original.path,
                                       modified.path,
                                       latest.path,
@@ -460,6 +465,7 @@
 d
 e
 EOD
+    expected.gsub!("\n", "\r\n") if
/cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
     diff = Svn::Core::Diff.file_diff3(original.path,
                                       modified.path,
                                       latest.path,
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 31 20:34:00 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.