13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
"""Black-box tests for bzr help.
113
113
self.assertTrue('rocks' not in commands)
115
115
def test_help_detail(self):
116
dash_h = self.run_bzr('commit -h')[0]
117
help_x = self.run_bzr('help commit')[0]
118
qmark_x = self.run_bzr('help commit')[0]
116
dash_h = self.run_bzr('diff -h')[0]
117
help_x = self.run_bzr('help diff')[0]
119
118
self.assertEquals(dash_h, help_x)
120
self.assertEquals(dash_h, qmark_x)
119
self.assertContainsRe(help_x, "Purpose:")
120
self.assertContainsRe(help_x, "Usage:")
121
self.assertContainsRe(help_x, "Options:")
122
self.assertContainsRe(help_x, "Description:")
123
self.assertContainsRe(help_x, "Examples:")
124
self.assertContainsRe(help_x, "See also:")
125
self.assertContainsRe(help_x, "Aliases:")
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:")
122
137
def test_help_help(self):
123
138
help = self.run_bzr('help help')[0]