~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_help.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-11 04:19:50 UTC
  • mfrom: (2598.1.5 check-options)
  • Revision ID: pqm@pqm.ubuntu.com-20070711041950-ci5yz9nyhbcdmuqv
(mbp,r=jamesw,r=aaron) Make option grammar consistent and enforce that with a test

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
            '  -h, --help  Show help message.\n'
44
44
            '\n'
45
45
            'See also: bar, foo\n')
46
46
 
51
51
        cmd = cmd_Demo()
52
52
        helptext = cmd.get_help_text()
53
53
        self.assertStartsWith(helptext, 'usage: bzr Demo')
54
 
        self.assertEndsWith(helptext, 'show help message\n')
 
54
        self.assertEndsWith(helptext, 'Show help message.\n')
55
55
 
56
56
    def test_command_with_additional_see_also(self):
57
57
        class cmd_WithSeeAlso(commands.Command):
61
61
        helptext = cmd.get_help_text(['gam'])
62
62
        self.assertEndsWith(
63
63
            helptext,
64
 
            '  -h, --help  show help message\n'
 
64
            '  -h, --help  Show help message.\n'
65
65
            '\n'
66
66
            'See also: bar, foo, gam\n')
67
67
 
72
72
        helptext = cmd.get_help_text(['gam'])
73
73
        self.assertEndsWith(
74
74
            helptext,
75
 
            '  -h, --help  show help message\n'
 
75
            '  -h, --help  Show help message.\n'
76
76
            '\n'
77
77
            'See also: gam\n')
78
78