mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +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
|
import re
|
||||||
from samba.tests.samba_tool.base import SambaToolCmdTest
|
from samba.tests.samba_tool.base import SambaToolCmdTest
|
||||||
from samba.tests import BlackboxProcessError
|
from samba.tests import BlackboxProcessError
|
||||||
|
from samba.tests import check_help_consistency
|
||||||
from samba.compat import get_string
|
from samba.compat import get_string
|
||||||
|
|
||||||
|
|
||||||
class HelpTestCase(SambaToolCmdTest):
|
class HelpTestCase(SambaToolCmdTest):
|
||||||
"""Tests for samba-tool help and --help
|
"""Tests for samba-tool help and --help
|
||||||
|
|
||||||
@ -65,6 +67,12 @@ class HelpTestCase(SambaToolCmdTest):
|
|||||||
output2 = get_string(output2)
|
output2 = get_string(output2)
|
||||||
self.assertEqual(output, 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:
|
if not new_commands:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user