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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:27:30 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521122730-q3leptj0lymfxcox
Fix some more tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
            _see_also = ['foo', 'bar']
47
47
        self.assertCmdHelp('''\
48
48
Purpose: A sample command.
49
 
Usage:   bzr WithSeeAlso
 
49
Usage:   brz WithSeeAlso
50
50
 
51
51
Options:
52
52
  --usage        Show usage message and options.
64
64
            __doc__ = """A sample command."""
65
65
        self.assertCmdHelp('''\
66
66
Purpose: A sample command.
67
 
Usage:   bzr Demo
 
67
Usage:   brz Demo
68
68
 
69
69
Options:
70
70
  --usage        Show usage message and options.
78
78
        helptext = cmd.get_help_text()
79
79
        self.assertStartsWith(helptext,
80
80
            'Purpose: A sample command.\n'
81
 
            'Usage:   bzr Demo')
 
81
            'Usage:   brz Demo')
82
82
        self.assertEndsWith(helptext,
83
83
            '  -h, --help     Show help message.\n\n')
84
84
 
134
134
 
135
135
                ::
136
136
 
137
 
                    bzr Demo something
 
137
                    brz Demo something
138
138
            """
139
139
        cmd = cmd_Demo()
140
140
        helptext = cmd.get_help_text()
141
141
        self.assertEqualDiff('''\
142
142
Purpose: A sample command.
143
 
Usage:   bzr Demo
 
143
Usage:   brz Demo
144
144
 
145
145
Options:
146
146
  --usage        Show usage message and options.
159
159
 
160
160
    A code block follows.
161
161
 
162
 
        bzr Demo something
 
162
        brz Demo something
163
163
 
164
164
''',
165
165
                                         helptext)
166
166
        helptext = cmd.get_help_text(plain=False)
167
167
        self.assertEqualDiff('''\
168
168
:Purpose: A sample command.
169
 
:Usage:   bzr Demo
 
169
:Usage:   brz Demo
170
170
 
171
171
:Options:
172
172
  --usage        Show usage message and options.
187
187
 
188
188
    ::
189
189
 
190
 
        bzr Demo something
 
190
        brz Demo something
191
191
 
192
192
''',
193
193
                             helptext)
208
208
        helptext = cmd.get_help_text()
209
209
        self.assertEqualDiff('''\
210
210
Purpose: A sample command.
211
 
Usage:   bzr Demo
 
211
Usage:   brz Demo
212
212
 
213
213
Options:
214
214
  --usage        Show usage message and options.
229
229
        helptext = cmd.get_help_text(verbose=False)
230
230
        self.assertEqualDiff('''\
231
231
Purpose: A sample command.
232
 
Usage:   bzr Demo
 
232
Usage:   brz Demo
233
233
 
234
234
Options:
235
235
  --usage        Show usage message and options.
237
237
  -v, --verbose  Display more information.
238
238
  -h, --help     Show help message.
239
239
 
240
 
See bzr help Demo for more details and examples.
 
240
See brz help Demo for more details and examples.
241
241
 
242
242
''',
243
243
                             helptext)
265
265
        helptext = cmd.get_help_text()
266
266
        self.assertEqualDiff('''\
267
267
Purpose: A sample command.
268
 
Usage:   bzr Demo
 
268
Usage:   brz Demo
269
269
 
270
270
Options:
271
271
  --usage        Show usage message and options.
355
355
            _see_also = ['foo', 'bar']
356
356
        self.assertCmdHelp('''\
357
357
zz{{:Purpose: zz{{A sample command.}}
358
 
}}zz{{:Usage:   bzr WithSeeAlso
 
358
}}zz{{:Usage:   brz WithSeeAlso
359
359
}}
360
360
zz{{:Options:
361
361
  --usage        zz{{Show usage message and options.}}
373
373
            __doc__ = """A sample command."""
374
374
        self.assertCmdHelp('''\
375
375
zz{{:Purpose: zz{{A sample command.}}
376
 
}}zz{{:Usage:   bzr Demo
 
376
}}zz{{:Usage:   brz Demo
377
377
}}
378
378
zz{{:Options:
379
379
  --usage        zz{{Show usage message and options.}}
437
437
            """
438
438
        self.assertCmdHelp('''\
439
439
zz{{:Purpose: zz{{A sample command.}}
440
 
}}zz{{:Usage:   bzr Demo
 
440
}}zz{{:Usage:   brz Demo
441
441
}}
442
442
zz{{:Options:
443
443
  --usage        zz{{Show usage message and options.}}