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

Re: Testing $SVNEDITOR in the command-line tests

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-10-03 17:03:22 CEST

On 10/3/06, David Glasser <glasser@mit.edu> wrote:
> As far as I can tell, none of the tests test things like "svn
> propedit" which require an editor. Since I'm planning to add URL
> editing to "svn propedit", I'd like to fix that first. Here's my
> idea:
>
> Make a script, subversion/tests/cmdline/svneditor.py, which reads in
> the file given to it, looks at the environment variable
> $SVNTEST_EDITOR, and calls svntest.editors.($SVNTEST_EDITOR) with the
> contents of the file, writes back to the file whatever that function
> returns, and exits.
>
> Then add a function, "svntest.main.use_editor" which takes a function
> name, sets $SVNEDITOR to point to the new script, and $SVNTEST_EDITOR
> to be that function. (These environment variables will get cleared
> before/after each test.)
>
> So, the idea is, we'd have a function svntest.editors.foo_to_bar which
> changes "foo" to "bar" in its argument, and before a call to
> run_and_verify_svn for propedit, we'd put a line like
> "svntest.main.use_editor('foo_to_bar')". You could easily use the
> same editor for a bunch of tests.
>
> Sound sane?

+1 from me, go for it.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 3 17:04:09 2006

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