Author: stsp
Date: Sun Nov 27 15:39:43 2011
New Revision: 1206741
URL: http://svn.apache.org/viewvc?rev=1206741&view=rev
Log:
Follow-up to r1206724: Fix an issue #3991 diff parsing test to make it pass.
Found by: danielsh
* subversion/tests/libsvn_diff/parse-diff-test.c
(check_content): Allow non-empty lines when EOF is hit before EOL.
(test_parse_unidiff_lacking_trailing_eol): Update test expectations,
the hunk text has no trailing EOL.
(test_funcs): Remove XFAIL from test_parse_unidiff_lacking_trailing_eol.
Modified:
subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c
Modified: subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1206741&r1=1206740&r2=1206741&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c Sun Nov 27
15:39:43 2011
@@ -314,7 +314,8 @@ check_content(svn_diff_hunk_t *hunk, svn
SVN_TEST_STRING_ASSERT(exp_buf->data, hunk_buf->data);
}
- SVN_TEST_ASSERT(hunk_buf->len == 0);
+ if (!hunk_eof)
+ SVN_TEST_ASSERT(hunk_buf->len == 0);
return SVN_NO_ERROR;
}
@@ -950,7 +951,7 @@ test_parse_unidiff_lacking_trailing_eol(
TODO: test for notification about the NL silently appended */
SVN_ERR(check_content(hunk, reverse,
"This is the file 'gamma'." NL
- "some more bytes to 'gamma'" NL,
+ "some more bytes to 'gamma'",
pool));
reverse = !reverse;
@@ -981,7 +982,7 @@ struct svn_test_descriptor_t test_funcs[
"test property diffs with odd symbols"),
SVN_TEST_PASS2(test_git_diffs_with_spaces_diff,
"test git diffs with spaces in paths"),
- SVN_TEST_XFAIL2(test_parse_unidiff_lacking_trailing_eol,
+ SVN_TEST_PASS2(test_parse_unidiff_lacking_trailing_eol,
"test parsing unidiffs lacking trailing eol"),
SVN_TEST_NULL
};