~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_aliases.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-02-24 16:28:50 UTC
  • mfrom: (1558.1.14 Aaron's integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060224162850-d1f8cb9cdfab3016
Merge trivial bugfix to --no-alias handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        def bzr(*args, **kwargs):
17
17
            return self.run_bzr(*args, **kwargs)[0]
18
18
 
 
19
        def bzr_catch_error(*args, **kwargs):
 
20
            return self.run_bzr(*args, **kwargs)[1]
 
21
 
 
22
 
19
23
        if os.path.isfile(config_filename()):
20
24
            # Something is wrong in environment, 
21
25
            # we risk overwriting users config 
48
52
        self.assertEquals(bzr('c1', 'a'), str1)
49
53
        self.assertEquals(bzr('c1', '--revision', '2', 'a'), str2)
50
54
 
51
 
        # If --no-alias isn't working, we will not get retcode=3
 
55
        # If --no-aliases isn't working, we will not get retcode=3
52
56
        bzr('--no-aliases', 'c', 'a', retcode=3)
53
57
 
 
58
        # If --no-aliases breaks all of bzr, we also get retcode=3
 
59
        # So we need to catch the output as well
 
60
        self.assertEquals(bzr_catch_error('--no-aliases', 'c', 'a', retcode=None), 
 
61
                "bzr: ERROR: unknown command 'c'\n")
 
62
 
54
63
        bzr('c', '-r1', '-r2', retcode=3)
55
64
        bzr('c1', '-r1', '-r2', retcode=3)
56
65
        bzr('c2', retcode=3)