summaryrefslogtreecommitdiffstats
path: root/testsuite/TestOptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/TestOptions.py')
-rw-r--r--testsuite/TestOptions.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/TestOptions.py b/testsuite/TestOptions.py
index bf49c4326..8e2f9b91d 100644
--- a/testsuite/TestOptions.py
+++ b/testsuite/TestOptions.py
@@ -49,6 +49,16 @@ class TestOptionSet(object):
res = os.buildGetopt()
assert 'H:' in res and 'G' in res and len(res) == 3
+ def test_buildLongGetopt(self):
+ opts = [('foo', Bcfg2.Options.Option('foo', 'test1', cmd='-G')),
+ ('bar', Bcfg2.Options.Option('foo', 'test2')),
+ ('baz', Bcfg2.Options.Option('foo', 'test1', cmd='--H',
+ odesc='1', long_arg=True))]
+ os = Bcfg2.Options.OptionSet(opts)
+ res = os.buildLongGetopt()
+ print res
+ assert 'H=' in res and len(res) == 1
+
def test_parse(self):
opts = [('foo', Bcfg2.Options.Option('foo', 'test1', cmd='-G')),
('bar', Bcfg2.Options.Option('foo', 'test2')),