subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1412400 - /subversion/trunk/subversion/tests/cmdline/diff_tests.py
Date Thu, 22 Nov 2012 01:05:48 GMT
Author: julianfoad
Date: Thu Nov 22 01:05:47 2012
New Revision: 1412400

URL: http://svn.apache.org/viewvc?rev=1412400&view=rev
Log:
Fix one of the two or three bugs in r1412382. This one caused diff_tests.py 66
to fail.

* subversion/tests/cmdline/diff_tests.py
  (diff_properties_no_newline): Apply and test the changes one at a time
    because we don't guarantee the order of diff output.

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=1412400&r1=1412399&r2=1412400&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Thu Nov 22 01:05:47 2012
@@ -4099,24 +4099,23 @@ def diff_properties_no_newline(sbox):
     ('p4', 'val1\n', 'val2\n'),
   ]
 
-  expected_output = \
-    make_diff_header("iota", "revision 1", "working copy") + \
-    make_diff_prop_header("iota")
-
-  for pname, old_val, new_val in subtests:
-    expected_output.extend(
-      make_diff_prop_modified(pname, old_val, new_val))
-
   # The "before" state.
   for pname, old_val, new_val in subtests:
     sbox.simple_propset(pname, old_val, 'iota')
   sbox.simple_commit() # r2
 
-  # The "after" state.
+  # Test one change at a time. (Because, with multiple changes, the order
+  # may not be predictable.)
   for pname, old_val, new_val in subtests:
+    expected_output = \
+      make_diff_header("iota", "revision 1", "working copy") + \
+      make_diff_prop_header("iota") + \
+      make_diff_prop_modified(pname, old_val, new_val)
+
     sbox.simple_propset(pname, new_val, 'iota')
+    svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff')
+    svntest.actions.run_and_verify_svn(None, None, [], 'revert', 'iota')
 
-  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff')
   os.chdir(old_cwd)
 
 ########################################################################



Mime
View raw message