~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ian Clatworthy
  • Date: 2009-02-26 06:15:24 UTC
  • mto: (4157.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 4158.
  • Revision ID: ian.clatworthy@canonical.com-20090226061524-kpy3n8na3mk4ubuy
help xxx is full help; xxx -h is concise help

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
        self.assertTrue('rocks' not in commands)
114
114
 
115
115
    def test_help_concise(self):
116
 
        dash_h  = self.run_bzr('commit -h')[0]
117
 
        help_x  = self.run_bzr('help commit')[0]
118
 
        self.assertEqualDiff(dash_h, help_x)
 
116
        dash_h  = self.run_bzr('diff -h')[0]
 
117
        self.assertContainsRe(dash_h, "Purpose:")
 
118
        self.assertContainsRe(dash_h, "Usage:")
 
119
        self.assertContainsRe(dash_h, "Options:")
 
120
        self.assertNotContainsRe(dash_h, "Description:")
 
121
        self.assertNotContainsRe(dash_h, "Examples:")
 
122
        self.assertContainsRe(dash_h, "See also:")
 
123
        self.assertContainsRe(dash_h, "Aliases:")
119
124
 
120
125
    def test_help_detail(self):
121
 
        dash_h  = self.run_bzr('commit -h -v')[0]
122
 
        help_x  = self.run_bzr('help -v commit')[0]
123
 
        self.assertEqualDiff(dash_h, help_x)
 
126
        help_x  = self.run_bzr('help diff')[0]
 
127
        self.assertContainsRe(help_x, "Purpose:")
 
128
        self.assertContainsRe(help_x, "Usage:")
 
129
        self.assertContainsRe(help_x, "Options:")
 
130
        self.assertContainsRe(help_x, "Description:")
 
131
        self.assertContainsRe(help_x, "Examples:")
 
132
        self.assertContainsRe(help_x, "See also:")
 
133
        self.assertContainsRe(help_x, "Aliases:")
124
134
 
125
135
    def test_help_help(self):
126
136
        help = self.run_bzr('help help')[0]