[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r27032 - in trunk/subversion/tests/cmdline: . svntest

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-09 08:22:30 CEST

On 10/8/07, pburba@tigris.org <pburba@tigris.org> wrote:
> Author: pburba
> Date: Mon Oct 8 19:25:13 2007
> New Revision: 27032
>
> Log:
> Make verify.py match *all* lines of acutal output to regex expected output.
>
> Previously, verify.py's regex verification of expected output would pass if
> *only* one of potentially several lines of actual output matched the regex.
> This is a recipe for writing tests that spuriously pass. With this patch
> *all* of the lines of stdout must match the expected regex. Expected stderr
> still behaves in the old way (only one line need match) as we rely on this
> quite frequently (i.e. we look for just one key part of an error message).
>
> * subversion/tests/cmdline/depth_tests.py
> (def depth_empty_checkout, depth_files_same_as_nonrecursive,
> depth_mixed_bring_in_dir, depth_update_to_more_depth,
> depth_immediates_receive_new_dir, upgrade_from_above):
> * subversion/tests/cmdline/lock_tests.py
> (ls_url_encoded):
> * subversion/tests/cmdline/stat_tests.py
> (status_ignored_dir):
> * subversion/tests/cmdline/switch_tests.py
> (relocate_beyond_repos_root):
> Tweak expected stdout regular expressions passed to
> svntest.actions.run_and_verify_svn to match all output.
>
> * subversion/tests/cmdline/merge_tests.py
> (expected_merge_output): Add an optional argument to get the standard 3-way
> merge notification. Minor whitespace fix.
> (merge_binary_with_common_ancestry): Update call to
> expected_merge_output().
> (merge_with_child_having_different_rev_ranges_to_merge): Use the correct
> path when constructing the expected output (this is the exact type of thing
> this patch would have caught a long time ago).
>
> * subversion/tests/cmdline/svntest/main.py
> (merge_notify_line): Add an optional argument to get the standard 3-way
> merge notification.
>
> * subversion/tests/cmdline/svntest/verify.py
> (createExpectedOutput): Add match_all argument allowing RegexOutput to be
> created that require all output lines to match the expected regex, rather
> than just one line.
> (ExpectedOutput:__init__): Add new self flag indicating if the expected
> output represents a regular expression.
> (is_equivalent_list): Support the case where expected output is a regular
> expression and we want to check that all actual output lines match it.
> (RegexOutput:__init__): Override ExpectedOutput.__init__
> (compare_and_display_lines): Update calls to createExpectedOutput().
>
> * subversion/tests/cmdline/update_tests.py
> (mergeinfo_update_elision): Properly escape Win32 path in expected out
> regex now that we are really going to require that it match the actual
> output.
>
> Modified:
> trunk/subversion/tests/cmdline/depth_tests.py
> trunk/subversion/tests/cmdline/lock_tests.py
> trunk/subversion/tests/cmdline/merge_tests.py
> trunk/subversion/tests/cmdline/stat_tests.py
> trunk/subversion/tests/cmdline/svntest/main.py
> trunk/subversion/tests/cmdline/svntest/verify.py
> trunk/subversion/tests/cmdline/switch_tests.py
> trunk/subversion/tests/cmdline/update_tests.py
>
> Modified: trunk/subversion/tests/cmdline/depth_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/depth_tests.py?pathrev=27032&r1=27031&r2=27032
> ==============================================================================
> --- trunk/subversion/tests/cmdline/depth_tests.py (original)
> +++ trunk/subversion/tests/cmdline/depth_tests.py Mon Oct 8 19:25:13 2007
> @@ -109,9 +109,16 @@
> if os.path.exists(os.path.join(wc_empty, "A")):
> raise svntest.Failure("depth-empty checkout created subdir 'A'")
>
> +# escaped_exp = '^URL: ' + re.escape(other_A_url) + '$' \
> +# '|Path.+|Repository.+|Revision.+|Node.+|Last.+|\n'
> +# svntest.actions.run_and_verify_svn(None, escaped_exp, [],
> +# 'info', '-rHEAD', A_wc_dir)
> +

Did you mean to include this commented block?

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 9 08:22:43 2007

This is an archived mail posted to the Subversion Dev mailing list.