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

  • Committer: Ian Clatworthy
  • Date: 2009-03-17 06:18:30 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-20090317061830-9glppr51ggivnrgl
Show usage on --usage, not -h

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
        self.assertTrue('rocks' in hidden)
113
113
        self.assertTrue('rocks' not in commands)
114
114
 
115
 
    def test_help_concise(self):
 
115
    def test_help_detail(self):
116
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:")
124
 
 
125
 
    def test_help_detail(self):
126
117
        help_x  = self.run_bzr('help diff')[0]
 
118
        self.assertEquals(dash_h, help_x)
127
119
        self.assertContainsRe(help_x, "Purpose:")
128
120
        self.assertContainsRe(help_x, "Usage:")
129
121
        self.assertContainsRe(help_x, "Options:")
132
124
        self.assertContainsRe(help_x, "See also:")
133
125
        self.assertContainsRe(help_x, "Aliases:")
134
126
 
 
127
    def test_help_usage(self):
 
128
        usage  = self.run_bzr('diff --usage')[0]
 
129
        self.assertContainsRe(usage, "Purpose:")
 
130
        self.assertContainsRe(usage, "Usage:")
 
131
        self.assertContainsRe(usage, "Options:")
 
132
        self.assertNotContainsRe(usage, "Description:")
 
133
        self.assertNotContainsRe(usage, "Examples:")
 
134
        self.assertContainsRe(usage, "See also:")
 
135
        self.assertContainsRe(usage, "Aliases:")
 
136
 
135
137
    def test_help_help(self):
136
138
        help = self.run_bzr('help help')[0]
137
139
        qmark = self.run_bzr('? ?')[0]