mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
tests/samba-tool: test --help consistency
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
027d35bda1
commit
272a6c3c30
@ -20,8 +20,10 @@
|
||||
import re
|
||||
from samba.tests.samba_tool.base import SambaToolCmdTest
|
||||
from samba.tests import BlackboxProcessError
|
||||
from samba.tests import check_help_consistency
|
||||
from samba.compat import get_string
|
||||
|
||||
|
||||
class HelpTestCase(SambaToolCmdTest):
|
||||
"""Tests for samba-tool help and --help
|
||||
|
||||
@ -65,6 +67,12 @@ class HelpTestCase(SambaToolCmdTest):
|
||||
output2 = get_string(output2)
|
||||
self.assertEqual(output, output2)
|
||||
|
||||
err = check_help_consistency(output,
|
||||
options_start='Options:',
|
||||
options_end='Available subcommands:')
|
||||
if err is not None:
|
||||
self.fail("consistency error with %s:\n%s" % (line, err))
|
||||
|
||||
if not new_commands:
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user