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

creating trees for testing

From: Sam TH <sam_at_uchicago.edu>
Date: 2001-04-20 16:58:40 CEST

I'd like to write some tests that create a repository and import some
files. But, in order to do this, you need some files. So, the
question is, how do you get those files. As I see it, there are
really two options:

 1. Put a tree with files to test in the subversion/subversion/tests
 dir. This would probably be the greek tree, and could be just copied
 as appropriate.

 2. Have a data structure for creating files and dir hierarchies.
 This would look something like this (in python):
      
      tree = [ ("A/B/C/lambda", "This is lambda"),
               ("A/B/omega", "This is omega") ]
 Then you have a function create_tree(tree) which lays this out on the
 file system.

Advantages of 1.
 - It's easy
 - The tree could be shared between tests (and even with the C test
 suite)

Advatages of 1.
 - It's probably more flexible

I don't really care either way. Does anyone else have opinions on this?
           
sam th --- sam_at_uchicago.edu --- http://www.abisource.com/~sam/
OpenPGP Key: CABD33FC --- http://samth.dyndns.org/key
DeCSS: http://samth.dyndns.org/decss

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:29 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.