[dconf: 3/4] tests: Add a simple test case for help and update.
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf: 3/4] tests: Add a simple test case for help and update.
- Date: Thu, 31 Jan 2019 13:47:42 +0000 (UTC)
commit 50e95fbf8b35526fb962393813ed74806b70c187
Author: Tomasz Miąsko <tomasz miasko gmail com>
Date: Mon Jan 7 00:00:00 2019 +0000
tests: Add a simple test case for help and update.
tests/test-dconf.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
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. """
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]