~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-01-12 01:34:46 UTC
  • mfrom: (5597.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20110112013446-le2folid2nfkgncn
(vila) Accept 0 to mean no limit for BZR_COLUMNS (Neil
        Martinsen-Burrell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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
1988
1988
        self.overrideEnv('BZR_COLUMNS', '12')
1989
1989
        self.assertEqual(12, osutils.terminal_width())
1990
1990
 
 
1991
    def test_BZR_COLUMNS_0_no_limit(self):
 
1992
        self.overrideEnv('BZR_COLUMNS', '0')
 
1993
        self.assertEqual(None, osutils.terminal_width())
 
1994
 
1991
1995
    def test_falls_back_to_COLUMNS(self):
1992
1996
        self.overrideEnv('BZR_COLUMNS', None)
1993
1997
        self.assertNotEqual('42', os.environ['COLUMNS'])