diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-03-08 18:42:00 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-03-08 18:42:00 +0000 |
commit | 64bb16f5f70c6cc97cede6782e45583af9bdced3 (patch) | |
tree | 7feb0f331fc026e23e307519afd7c3661efc04ed /testsuite | |
parent | 07467bbc04b77453a9d27a5dd82729d304eddb70 (diff) | |
download | bcfg2-64bb16f5f70c6cc97cede6782e45583af9bdced3.tar.gz bcfg2-64bb16f5f70c6cc97cede6782e45583af9bdced3.tar.bz2 bcfg2-64bb16f5f70c6cc97cede6782e45583af9bdced3.zip |
implement support for long options
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4404 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/TestOptions.py | 10 |
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')), |