/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 breezy/tests/blackbox/test_help.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 23:15:15 UTC
  • mfrom: (7180 work)
  • mto: This revision was merged to the branch mainline in revision 7183.
  • Revision ID: jelmer@jelmer.uk-20181116231515-zqd2yn6kj8lfydyp
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        self.assertEqual(expected, out)
96
96
 
97
97
    def test_help_commands(self):
98
 
        dash_help  = self.run_bzr('--help commands')[0]
99
 
        commands   = self.run_bzr('help commands')[0]
 
98
        dash_help = self.run_bzr('--help commands')[0]
 
99
        commands = self.run_bzr('help commands')[0]
100
100
        hidden = self.run_bzr('help hidden-commands')[0]
101
 
        long_help  = self.run_bzr('help --long')[0]
 
101
        long_help = self.run_bzr('help --long')[0]
102
102
        qmark_long = self.run_bzr('? --long')[0]
103
103
        qmark_cmds = self.run_bzr('? commands')[0]
104
104
        self.assertEqual(dash_help, commands)
121
121
            cmds = []
122
122
            for line in help_output.split('\n'):
123
123
                if line.startswith(' '):
124
 
                    continue # help on more than one line
 
124
                    continue  # help on more than one line
125
125
                cmd = line.split(' ')[0]
126
126
                if line:
127
127
                    cmds.append(cmd)
134
134
        self.assertTrue('rocks' not in commands)
135
135
 
136
136
    def test_help_detail(self):
137
 
        dash_h  = self.run_bzr('diff -h')[0]
138
 
        help_x  = self.run_bzr('help diff')[0]
 
137
        dash_h = self.run_bzr('diff -h')[0]
 
138
        help_x = self.run_bzr('help diff')[0]
139
139
        self.assertEqual(dash_h, help_x)
140
140
        self.assertContainsRe(help_x, "Purpose:")
141
141
        self.assertContainsRe(help_x, "Usage:")
146
146
        self.assertContainsRe(help_x, "Aliases:")
147
147
 
148
148
    def test_help_usage(self):
149
 
        usage  = self.run_bzr('diff --usage')[0]
 
149
        usage = self.run_bzr('diff --usage')[0]
150
150
        self.assertContainsRe(usage, "Purpose:")
151
151
        self.assertContainsRe(usage, "Usage:")
152
152
        self.assertContainsRe(usage, "Options:")
162
162
        for line in help.split('\n'):
163
163
            if '--long' in line:
164
164
                self.assertContainsRe(line,
165
 
                    r'Show help on all commands\.')
 
165
                                      r'Show help on all commands\.')
166
166
 
167
167
    def test_help_with_aliases(self):
168
168
        original = self.run_bzr('help cat')[0]