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

Re: svn commit: rev 2309 - trunk/subversion/tests/clients/cmdline trunk/subversion/tests/clients/cmdline/svntest

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-06-24 16:21:59 CEST

kfogel@tigris.org writes:

> + ### Okay, I don't get it. How can I set up expected_output so that
> + ### it expects the following output and _only_ the following output?
> + ###
> + ### _ A/mu
> + ### U A/B/lambda
> + ### U A/D/G/rho
> + ### G A/D/G/pi
> + ### C A/D/G/tau
> + ###
> + ### In general, I think I'm missing something about our
> + ### expected_output setup process. It seems that it wants to be
> + ### initialized from some state. But why should it? I mean, it's
> + ### pure output -- I know *exactly* the lines I'm expecting to see,
> + ### so why should any prior state enter the picture?

No, 'output' trees don't need to be initialized with any magic
routine. You just make a list of exactly what you expect to be
output.

Here are the "three bits".

1. Disk Trees: how the working copy looks on disk (text & props)

  Initial state: grab a copy of the Greek Tree State like so:

                    expected_disk = svntest.main.greek_state.copy()

  Tweakage: use normal tweak methods like so:

                    expected_disk.tweak('A/mu',
                         contents=expected_disk.desc['A/mu'].contents
                         + 'appended mu text')

2. Status Trees: does 'svn st -v' show what you expect?

  Initial state: create a generic status listing, everything at rev N:

                     expected_status =
                        svntest.actions.get_virginal_state(wc_dir, N)

  Tweakage: use normal tweak methods like so:

                     expected_status.tweak('A/mu', 'A/D/G/rho', wc_rev=2)

3. Output trees: was the subcommand output what you expected?

  Initial state: just make a list of what you expected to see:

                      expected_output = wc.State(wc_dir, {
                                           'A/mu' : Item(verb='Sending'),
                                           'A/D/G/rho' : Item(verb='Sending'),
                                        })

                      expected_output = svntest.wc.State(wc_dir, {
                                           'A/D/G' : Item(status='A '),
                                           'A/D/G/pi' : Item(status='U '),
                                           'A/D/G/rho' : Item(status='G '),
                                           'A/D/G/tau' : Item(status='C '),
                                         })

   Tweakage: no need to tweak. You already specified the exact
                   contents of the State object.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 24 16:25:15 2002

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.