> -----Original Message----- > From: rhuij...@apache.org [mailto:rhuij...@apache.org] > Sent: zondag 4 april 2010 17:31 > To: comm...@subversion.apache.org > Subject: svn commit: r930702 - > /subversion/trunk/subversion/tests/libsvn_client/client-test.c > > Author: rhuijben > Date: Sun Apr 4 15:31:09 2010 > New Revision: 930702 > > URL: http://svn.apache.org/viewvc?rev=930702&view=rev > Log: > Make the patch test in client-test pass on Windows by removing the > assumption that the to be patched file has platform dependent EOLs. It > has "\n" as end of line marker on all platforms.
Stefan or Daniel, Can one of you (or maybe somebody else) confirm that this is the designed behavior? Thanks, Bert > > * subversion/tests/libsvn_client/client-test.c > (check_patch_result): Add eol argument and pass this value to > svn_stream_readline. > (test_patch): Assume "\n" line endings on the tempfile, but native > eols on the reject file. > > Modified: > subversion/trunk/subversion/tests/libsvn_client/client-test.c > > Modified: subversion/trunk/subversion/tests/libsvn_client/client-test.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_c > lient/client-test.c?rev=930702&r1=930701&r2=930702&view=diff > ======================================================================= > ======= > --- subversion/trunk/subversion/tests/libsvn_client/client-test.c > (original) > +++ subversion/trunk/subversion/tests/libsvn_client/client-test.c Sun > Apr 4 15:31:09 2010 > @@ -206,10 +206,10 @@ test_args_to_target_array(apr_pool_t *po > > > /* A helper function for test_patch(). > - * It compares a patched or reject file against expected content. > - * It also deletes the file if the check was successful. */ > + * It compares a patched or reject file against expected content using > the > + * specified EOL. It also deletes the file if the check was > successful. */ > static svn_error_t * > -check_patch_result(const char *path, const char **expected_lines, > +check_patch_result(const char *path, const char **expected_lines, > const char *eol, > int num_expected_lines, apr_pool_t *pool) > { > svn_stream_t *stream; > @@ -226,7 +226,7 @@ check_patch_result(const char *path, con > > svn_pool_clear(iterpool); > > - SVN_ERR(svn_stream_readline(stream, &line, APR_EOL_STR, &eof, > pool)); > + SVN_ERR(svn_stream_readline(stream, &line, eol, &eof, pool)); > if (i < num_expected_lines) > if (strcmp(expected_lines[i++], line->data) != 0) > return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, > @@ -357,14 +357,14 @@ test_patch(const svn_test_opts_t *opts, > key = "A/D/gamma"; > patched_tempfile_path = apr_hash_get(patched_tempfiles, key, > APR_HASH_KEY_STRING); > - SVN_ERR(check_patch_result(patched_tempfile_path, expected_gamma, > + SVN_ERR(check_patch_result(patched_tempfile_path, expected_gamma, > "\n", > EXPECTED_GAMMA_LINES, pool)); > SVN_ERR_ASSERT(apr_hash_count(reject_tempfiles) == 1); > key = "A/D/gamma"; > reject_tempfile_path = apr_hash_get(reject_tempfiles, key, > APR_HASH_KEY_STRING); > SVN_ERR(check_patch_result(reject_tempfile_path, > expected_gamma_reject, > - EXPECTED_GAMMA_REJECT_LINES, pool)); > + APR_EOL_STR, EXPECTED_GAMMA_REJECT_LINES, > pool)); > > return SVN_NO_ERROR; > } >