]> granicus.if.org Git - graphviz/commitdiff
Add test of unsupported option handling to tools test
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Tue, 29 Sep 2020 09:42:30 +0000 (11:42 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:25 +0000 (21:10 +0200)
rtest/test_tools.py

index dafbcf4f931129019df4126d7b1ab2978abb6a6f..dbb693d9d8be0d6367277b6477df70e753cc2cd5 100644 (file)
@@ -155,3 +155,11 @@ def test_tools(tool):
     )
     assert re.match('usage', output, flags=re.IGNORECASE) is not None, \
       tool +' -? did not show usage'
+
+    # Test unsupported option
+    returncode = subprocess.call(
+        [tool, '-$'],
+        env=environ_copy,
+    )
+
+    assert returncode != 0, tool + ' accepted unsupported option -$'