~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 by Canonical Ltd
2
 
# -*- coding: utf-8 -*-
 
1
# Copyright (C) 2005, 2006 by Canonical Ltd
3
2
 
4
3
# This program is free software; you can redistribute it and/or modify
5
4
# it under the terms of the GNU General Public License as published by
26
25
class TestHelp(ExternalBase):
27
26
 
28
27
    def test_help_basic(self):
29
 
        dash_help = self.runbzr('--help')[0]
30
 
        just_help = self.runbzr('help')[0]
31
 
        quest_mk  = self.runbzr('?')[0]
32
 
        self.assertEquals(dash_help, just_help)
33
 
        self.assertEquals(dash_help, quest_mk)
 
28
        for cmd in ['--help', 'help', '-h', '-?']:
 
29
            output = self.runbzr(cmd)[0]
 
30
            line1 = output.split('\n')[0]
 
31
            if not line1.startswith('Bazaar-NG'):
 
32
                self.fail("bad output from bzr %s:\n%r" % (cmd, output))
 
33
        # see https://launchpad.net/products/bzr/+bug/35940, -h doesn't work
34
34
 
35
35
    def test_help_commands(self):
36
36
        dash_help  = self.runbzr('--help commands')[0]