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

[PATCH] gets the wc Ruby binding tests passing on Windows.

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-01-06 05:46:31 CET

Hi,
When we are testing line endings, we need to make sure Ruby's special
line ending processing on Windows isn't getting in our way. With this
patch (and the others that proceed it all the WC bindings tests for
Ruby pass on Windows.

--
Joe Swatosh
[[[
* subversion/bindings/swig/ruby/test/test_wc.rb
  (test_translated_file): Treat files as binary so on windows Ruby's line end
  processing doesn't mask what Subversion does with line ends when
  the svn:eol-style is set.
]]]
Index: subversion/bindings/swig/ruby/test/test_wc.rb
===================================================================
--- subversion/bindings/swig/ruby/test/test_wc.rb       (revision 22912)
+++ subversion/bindings/swig/ruby/test/test_wc.rb       (working copy)
@@ -429,13 +429,13 @@
       translated_file = access.translated_file(src_path, crlf_path,
                                                Svn::Wc::TRANSLATE_FROM_NF)
-      assert_equal(crlf_source, File.read(translated_file))
+      assert_equal(crlf_source, File.open(translated_file, 'rb'){|f|f.read})
       translated_file = access.translated_file(src_path, cr_path,
                                                Svn::Wc::TRANSLATE_FROM_NF)
-      assert_equal(cr_source, File.read(translated_file))
+      assert_equal(cr_source, File.open(translated_file, 'rb'){|f|f.read})
       translated_file = access.translated_file(src_path, lf_path,
                                                Svn::Wc::TRANSLATE_FROM_NF)
-      assert_equal(lf_source, File.read(translated_file))
+      assert_equal(lf_source, File.open(translated_file, 'rb'){|f|f.read})
     end
   end
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 6 05:46:37 2007

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