subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1815961 - /subversion/trunk/subversion/tests/cmdline/diff_tests.py
Date Tue, 21 Nov 2017 17:13:27 GMT
Author: julianfoad
Date: Tue Nov 21 17:13:27 2017
New Revision: 1815961

URL: http://svn.apache.org/viewvc?rev=1815961&view=rev
Log:
Add an XFAIL test for #4706, 'diff --git crashes with unversioned files'.

* subversion/tests/cmdline/diff_tests.py
  (diff_unversioned_files_git): New test.
  (test_list): Add it.

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=1815961&r1=1815960&r2=1815961&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Tue Nov 21 17:13:27 2017
@@ -5140,6 +5140,26 @@ def diff_peg_resolve(sbox):
                                      repo_url + '/branches/A2',
                                      wc_dir, '-r1:2')
 
+@XFail()
+@Issue(4706)
+def diff_unversioned_files_git(sbox):
+  "diff unversioned files in git format"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  svntest.main.file_write(sbox.ospath('foo'), "foo\n")
+  svntest.main.file_write(sbox.ospath('A/bar'), "bar\n")
+  expected_output = make_diff_header("foo", "working copy", "working copy",
+                                     "foo", "A/bar") + [
+                      "@@ -1 +1 @@\n",
+                      "-foo\n",
+                      "+bar\n"
+                    ]
+  svntest.actions.run_and_verify_svn(expected_output, [],
+                                     'diff', '--git',
+                                     '--old', sbox.ospath('foo'),
+                                     '--new', sbox.ospath('A/bar'))
+
 
 ########################################################################
 #Run the tests
@@ -5236,6 +5256,7 @@ test_list = [ None,
               diff_incomplete_props,
               diff_symlinks,
               diff_peg_resolve,
+              diff_unversioned_files_git,
               ]
 
 if __name__ == '__main__':



Mime
View raw message