Fix several bugs in svn_rangelist_intersect. Augment its test suite
(and svn_rangelist_remove's) with tests based on randomly generated
data. Fix test suite to output ranges (in failure messages) the same
way that the real code does (ie, add 1 to 'start', don't reverse the
meaning of '*', and just print one number for single-revision
ranges).
* subversion/libsvn_subr/mergeinfo.c
(rangelist_intersect_or_remove): Make sure that elt1 is initialized
each time through the loop. When intersecting, make sure that all
generated ranges are actually in both ranges by using MIN/MAX.
Make sure that extra "whiteboard" elements are only combined into
*lastrange for 'remove' mode, not 'intersect'.
* subversion/tests/libsvn_subr/mergeinfo-test.c
(range_to_string): New.
(verify_ranges_match): Use range_to_string.
(RANDOM_REV_ARRAY_LENGTH, random_rev_array_seed,
randomly_fill_rev_array, rev_array_to_rangelist): New helper
functions.
(test_rangelist_remove_randomly, test_rangelist_intersect_randomly):
New tests.
(test_funcs): Add test_rangelist_remove_randomly and
test_rangelist_intersect_randomly. Mark test_rangelist_intersect
as passing.
git-svn-id: http://svn.collab.net/repos/svn/trunk@29126 612f8ebc-c883-4be0-9ee0-a4e9ef946e3a