~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-11 00:23:23 UTC
  • mfrom: (2070 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20061011002323-82ba88c293d7caff
[merge] bzr.dev 2070

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2005 by Canonical Ltd
2
 
 
 
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
5
5
# the Free Software Foundation; either version 2 of the License, or
6
6
# (at your option) any later version.
7
 
 
 
7
#
8
8
# This program is distributed in the hope that it will be useful,
9
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
148
148
        help = {}
149
149
        current = None
150
150
        for line in self.capture('help commands').splitlines():
151
 
            if line.startswith('bzr '):
152
 
                current = line.split()[1]
 
151
            if not line.startswith(' '):
 
152
                current = line.split()[0]
153
153
            help[current] = help.get(current, '') + line
154
154
 
155
155
        return help
189
189
            help = self.capture('help myplug')
190
190
            self.assertContainsRe(help, 'From plugin "myplug"')
191
191
            help = self.split_help_commands()['myplug']
192
 
            self.assertContainsRe(help, 'From plugin "myplug"')
 
192
            self.assertContainsRe(help, '\[myplug\]')
193
193
        finally:
194
194
            # remove the plugin 'plugin'
195
195
            if getattr(bzrlib.plugins, 'plugin', None):