subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1563068 - /subversion/trunk/subversion/tests/cmdline/diff_tests.py
Date Fri, 31 Jan 2014 06:51:57 GMT
Author: breser
Date: Fri Jan 31 06:51:57 2014
New Revision: 1563068

URL: http://svn.apache.org/r1563068
Log:
Followup to r1563066: Really fix the tests on Windows, I hope.

* subversion/tests/cmdline/diff_tests.py
  (diff_repo_wc_file_props): run_and_verify_svn normalizes the line endings
    hiding the fact that we changed to CRLF on Windows (but not Unix).  Apply,
    a nasty hack to work around this for now.

Modified:
    subversion/trunk/subversion/tests/cmdline/diff_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1563068&r1=1563067&r2=1563068&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Fri Jan 31 06:51:57 2014
@@ -4757,10 +4757,19 @@ def diff_repo_wc_file_props(sbox):
 
   # test that not only the property but also the file changes
   # i.e. that the line endings substitution works
+  if svntest.main.is_os_windows():
+    # test suite normalizes crlf output into just lf on Windows.
+    # so we have to assume it worked because there is an add and
+    # remove line with the same content.  Fortunately, it does't
+    # do this on *nix so we can be pretty sure that it works right.
+    # TODO: Provide a way to handle this better
+    crlf = '\n'
+  else:
+    crlf = '\r\n'
   expected_output = make_diff_header(iota, 'revision 1', 'working copy') + \
                     [ '@@ -1 +1 @@\n',
                       "-This is the file 'iota'.\n",
-                      "+This is the file 'iota'.\r\n" ] + \
+                      "+This is the file 'iota'." + crlf ] + \
                     make_diff_prop_header(iota) + \
                     make_diff_prop_added('svn:eol-style', 'CRLF')
 



Mime
View raw message