/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/blackbox/test_alias.py

  • Committer: Martin Pool
  • Date: 2010-09-13 08:20:57 UTC
  • mto: This revision was merged to the branch mainline in revision 5420.
  • Revision ID: mbp@sourcefrog.net-20100913082057-ssrdeu6iya6uq42h
Cleanup style of developer advice about kwargs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2010 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.tests.blackbox import ExternalBase
21
 
 
22
 
 
23
 
class TestAlias(ExternalBase):
 
20
from bzrlib import (
 
21
    config,
 
22
    tests,
 
23
    )
 
24
 
 
25
 
 
26
class TestAlias(tests.TestCaseWithTransport):
24
27
 
25
28
    def test_list_alias_with_none(self):
26
29
        """Calling alias with no parameters lists existing aliases."""
41
44
        out, err = self.run_bzr('alias commit')
42
45
        self.assertEquals('bzr alias commit="commit --strict"\n', out)
43
46
 
 
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
 
44
63
    def test_alias_listing_alphabetical(self):
45
64
        self.run_bzr('alias commit="commit --strict"')
46
65
        self.run_bzr('alias ll="log --short"')