/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ui.py

  • Committer: Wouter van Heyst
  • Date: 2006-06-06 12:06:20 UTC
  • mfrom: (1740 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: larstiq@larstiq.dyndns.org-20060606120620-50066b0951e4ef7c
merge bzr.dev 1740

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import os
21
21
from StringIO import StringIO
 
22
import re
22
23
import sys
23
24
 
24
25
import bzrlib
163
164
            self.apply_redirected(
164
165
                None, factory.stdout, factory.stdout, factory.get_boolean, "what do you want")
165
166
            )
166
 
        self.assertEqual(
167
 
            "\r/ [                                                                   ] foo 0/1"
168
 
            "\r                                                                               "
169
 
            "\rwhat do you want? [y/n]:what do you want? [y/n]:", factory.stdout.getvalue())
 
167
        # use a regular expression so that we don't depend on the particular
 
168
        # screen width - could also set and restore $COLUMN if that has
 
169
        # priority on all platforms, but it doesn't at present.
 
170
        output = factory.stdout.getvalue()
 
171
        if not re.match(
 
172
            "\r/ \\[    *\\] foo 0/1"
 
173
            "\r   *" 
 
174
            "\rwhat do you want\\? \\[y/n\\]:what do you want\\? \\[y/n\\]:", 
 
175
            output):
 
176
            self.fail("didn't match factory output %r" % factory)