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

Testing $SVNEDITOR in the command-line tests

From: David Glasser <glasser_at_mit.edu>
Date: 2006-10-03 16:52:39 CEST

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?

--dave

-- 
David Glasser | glasser_at_mit.edu | 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 3 16:53:52 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.