~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev to resolve news conflict

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005-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
151
151
            '"{revno} {branch_nick} {clean}\n" branch')
152
152
        self.assertEqual("2 branch 0\n", out)
153
153
        self.assertEqual("", err)
 
154
    
 
155
    def test_non_ascii(self):
 
156
        """Test that we can output non-ascii data"""
 
157
        
 
158
        commit_message = u'Non-ascii message with character not in latin-1: \u1234'
 
159
        
 
160
        tree = self.make_branch_and_tree('.')
 
161
        self.build_tree(['a_file'])
 
162
        tree.add('a_file')
 
163
        tree.commit(commit_message)
 
164
        out, err = self.run_bzr(
 
165
            ['version-info', '--include-history'], encoding='latin-1')
 
166
        
 
167
        self.assertContainsString(out, commit_message.encode('utf-8'))
 
168
 
 
169