~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

NEWS section template into a separate file

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Test that bzr handles locales in a reasonable way"""
18
18
 
42
42
 
43
43
    def test_log_C(self):
44
44
        out, err = self.run_bzr_subprocess(
45
 
            '--no-aliases --no-plugins -q log --log-format=long tree',
 
45
            '--no-aliases --no-plugins log -q --log-format=long tree',
46
46
               env_changes={'LANG':'C', 'BZR_PROGRESS_BAR':'none',
47
47
                            'LC_ALL':None, 'LC_CTYPE':None, 'LANGUAGE':None})
48
48
        self.assertEqual('', err)
58
58
 
59
59
    def test_log_BOGUS(self):
60
60
        out, err = self.run_bzr_subprocess(
61
 
            '--no-aliases --no-plugins -q log --log-format=long tree',
 
61
            '--no-aliases --no-plugins log -q --log-format=long tree',
62
62
               env_changes={'LANG':'BOGUS', 'BZR_PROGRESS_BAR':'none',
63
63
                            'LC_ALL':None, 'LC_CTYPE':None, 'LANGUAGE':None})
64
 
        # XXX: This depends on the exact formatting of a locale.Error
65
 
        # as the first part of the string. It may be a little tempermental
66
 
        self.assertEqualDiff("""\
67
 
bzr: warning: unsupported locale setting
68
 
  Could not determine what text encoding to use.
69
 
  This error usually means your Python interpreter
70
 
  doesn't support the locale set by $LANG (BOGUS)
71
 
  Continuing with ascii encoding.
72
 
""", err)
 
64
        self.assertStartsWith(err, 'bzr: warning: unsupported locale setting')
73
65
        self.assertEqualDiff("""\
74
66
------------------------------------------------------------
75
67
revno: 1