~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
 
18
18
"""Tests of the 'bzr alias' command."""
19
19
 
20
 
from bzrlib import (
21
 
    config,
22
 
    tests,
23
 
    )
24
 
 
25
 
 
26
 
class TestAlias(tests.TestCaseWithTransport):
 
20
from bzrlib.tests.blackbox import ExternalBase
 
21
 
 
22
 
 
23
class TestAlias(ExternalBase):
27
24
 
28
25
    def test_list_alias_with_none(self):
29
26
        """Calling alias with no parameters lists existing aliases."""
44
41
        out, err = self.run_bzr('alias commit')
45
42
        self.assertEquals('bzr alias commit="commit --strict"\n', out)
46
43
 
47
 
    def test_unicode_alias(self):
48
 
        """Unicode aliases should work (Bug #529930)"""
49
 
        file_name = u'foo\xb6'
50
 
 
51
 
        tree = self.make_branch_and_tree('.')
52
 
        self.build_tree([file_name])
53
 
        tree.add(file_name)
54
 
        tree.commit('added')
55
 
 
56
 
        config.GlobalConfig.from_string(
57
 
            u'[ALIASES]\nust=st %s\n' % (file_name,), save=True)
58
 
 
59
 
        out, err = self.run_bzr('ust')
60
 
        self.assertEquals(err, '')
61
 
        self.assertEquals(out, '')
62
 
 
63
44
    def test_alias_listing_alphabetical(self):
64
45
        self.run_bzr('alias commit="commit --strict"')
65
46
        self.run_bzr('alias ll="log --short"')