diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2019-01-07 00:00:00 +0000 |
---|---|---|
committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2019-01-29 15:48:54 +0100 |
commit | 50e95fbf8b35526fb962393813ed74806b70c187 (patch) | |
tree | 8465e0353d224d90fd3208ca24ecc6422f3818aa /tests/test-dconf.py | |
parent | d36936fe111147db6ca2cd890ecec48a74ae343a (diff) | |
download | dconf-50e95fbf8b35526fb962393813ed74806b70c187.tar.gz |
tests: Add a simple test case for help and update.
Diffstat (limited to 'tests/test-dconf.py')
-rwxr-xr-x | tests/test-dconf.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-dconf.py b/tests/test-dconf.py index aa04ec7..51e522b 100755 --- a/tests/test-dconf.py +++ b/tests/test-dconf.py @@ -237,6 +237,9 @@ class DBusTest(unittest.TestCase): ['write', '/key', 'not-a-gvariant-value'], # Too many arguments: ['write', '/key', '1', '2'], + + # Too many arguments: + ['update', 'a', 'b'], ] for args in cases: @@ -245,6 +248,15 @@ class DBusTest(unittest.TestCase): dconf(*args, stderr=subprocess.PIPE) self.assertRegex(cm.exception.stderr, 'Usage:') + def test_help(self): + """Help show usage information on stdout and exits with success.""" + + stdout = dconf('help', 'write').stdout + self.assertRegex(stdout, 'dconf write KEY VALUE') + + stdout = dconf('help', 'help').stdout + self.assertRegex(stdout, 'dconf help COMMAND') + def test_read_nonexisiting(self): """Reading missing key produces no output. """ |