You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2021/02/23 15:50:44 UTC
svn commit: r1886841 -
/subversion/trunk/subversion/tests/cmdline/export_tests.py
Author: kotkov
Date: Tue Feb 23 15:50:44 2021
New Revision: 1886841
URL: http://svn.apache.org/viewvc?rev=1886841&view=rev
Log:
Add a test for the current behavior of `svn export` with a file that has
both svn:keywords and inconsistent EOLs, but without svn:eol-style.
* subversion/tests/cmdline/export_tests.py
(export_keyword_translation_inconsistent_eol): New test.
(test_list): Run the new test.
Modified:
subversion/trunk/subversion/tests/cmdline/export_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/export_tests.py?rev=1886841&r1=1886840&r2=1886841&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/export_tests.py Tue Feb 23 15:50:44 2021
@@ -1124,6 +1124,35 @@ def export_revision_with_root_relative_e
expected_disk,
'-r', 2)
+def export_keyword_translation_inconsistent_eol(sbox):
+ "export keyword translation with inconsistent EOLs"
+ sbox.build(empty=True)
+ sbox.simple_mkdir('dir')
+ # Create a file with keywords and inconsistent EOLs, don't set svn:eol-style.
+ sbox.simple_add_text('$LastChangedRevision$\n\r\n', 'dir/file')
+ sbox.simple_propset('svn:keywords', 'LastChangedRevision', 'dir/file')
+ sbox.simple_commit()
+
+ export_target = sbox.add_wc_path('export')
+
+ expected_disk = svntest.wc.State('', {
+ 'dir' : Item(),
+ 'dir/file' : Item("$LastChangedRevision: 1 $\n\r\n"),
+ })
+
+ expected_output = svntest.wc.State(export_target, {
+ '' : Item(status='A '),
+ 'dir' : Item(status='A '),
+ 'dir/file' : Item(status='A ')
+ })
+
+ # We should be able to export without any unexpected errors.
+ svntest.actions.run_and_verify_export2(sbox.repo_url,
+ export_target,
+ expected_output,
+ expected_disk,
+ keep_eol_style=True)
+
########################################################################
# Run the tests
@@ -1162,6 +1191,7 @@ test_list = [ None,
export_file_external,
export_file_externals2,
export_revision_with_root_relative_external,
+ export_keyword_translation_inconsistent_eol,
]
if __name__ == '__main__':