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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-03 07:34:25 UTC
  • mfrom: (2779.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070903073425-ouk9qod51gqk18nn
(Ian Clatworthy) Verbosity levels and standard options

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        helptext = cmd.get_help_text()
41
41
        self.assertEndsWith(
42
42
            helptext,
43
 
            '  -h, --help  Show help message.\n'
 
43
            '  -v, --verbose  Display more information.\n'
 
44
            '  -q, --quiet    Only display errors and warnings.\n'
 
45
            '  -h, --help     Show help message.\n'
44
46
            '\n'
45
47
            'See also: bar, foo\n')
46
48
 
53
55
        self.assertStartsWith(helptext,
54
56
            'Purpose: A sample command.\n'
55
57
            'Usage:   bzr Demo')
56
 
        self.assertEndsWith(helptext, 'Show help message.\n\n')
 
58
        self.assertEndsWith(helptext,
 
59
            '  -h, --help     Show help message.\n\n')
57
60
 
58
61
    def test_command_with_additional_see_also(self):
59
62
        class cmd_WithSeeAlso(commands.Command):
63
66
        helptext = cmd.get_help_text(['gam'])
64
67
        self.assertEndsWith(
65
68
            helptext,
66
 
            '  -h, --help  Show help message.\n'
 
69
            '  -v, --verbose  Display more information.\n'
 
70
            '  -q, --quiet    Only display errors and warnings.\n'
 
71
            '  -h, --help     Show help message.\n'
67
72
            '\n'
68
73
            'See also: bar, foo, gam\n')
69
74
 
74
79
        helptext = cmd.get_help_text(['gam'])
75
80
        self.assertEndsWith(
76
81
            helptext,
77
 
            '  -h, --help  Show help message.\n'
 
82
            '  -v, --verbose  Display more information.\n'
 
83
            '  -q, --quiet    Only display errors and warnings.\n'
 
84
            '  -h, --help     Show help message.\n'
78
85
            '\n'
79
86
            'See also: gam\n')
80
87
 
107
114
            'Usage:   bzr Demo\n'
108
115
            '\n'
109
116
            'Options:\n'
110
 
            '  -h, --help  Show help message.\n'
 
117
            '  -v, --verbose  Display more information.\n'
 
118
            '  -q, --quiet    Only display errors and warnings.\n'
 
119
            '  -h, --help     Show help message.\n'
111
120
            '\n'
112
121
            'Examples:\n'
113
122
            '    Example 1:\n'
124
133
            ':Usage:   bzr Demo\n'
125
134
            '\n'
126
135
            ':Options:\n'
127
 
            '  -h, --help  Show help message.\n'
 
136
            '  -v, --verbose  Display more information.\n'
 
137
            '  -q, --quiet    Only display errors and warnings.\n'
 
138
            '  -h, --help     Show help message.\n'
128
139
            '\n'
129
140
            ':Examples:\n'
130
141
            '    Example 1::\n'
159
170
            '\n'
160
171
            '\n'
161
172
            'Options:\n'
162
 
            '  -h, --help  Show help message.\n'
 
173
            '  -v, --verbose  Display more information.\n'
 
174
            '  -q, --quiet    Only display errors and warnings.\n'
 
175
            '  -h, --help     Show help message.\n'
163
176
            '\n'
164
177
            'Description:\n'
165
178
            '  Blah blah blah.\n\n')