mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-16 20:38:48 +02:00
tests: Check "gdbus-codegen --generate-docbook"
Verify that the command line argument works, by checking it's not writing to stdout/stderr, and that the generated file isn't empty.
This commit is contained in:
parent
4db9d43f1a
commit
ba2725f263
@ -382,6 +382,26 @@ G_END_DECLS
|
|||||||
# The output should be the same.
|
# The output should be the same.
|
||||||
self.assertEqual(result1.out, result2.out)
|
self.assertEqual(result1.out, result2.out)
|
||||||
|
|
||||||
|
def test_generate_docbook(self):
|
||||||
|
"""Test the basic functionality of the docbook generator."""
|
||||||
|
xml_contents = """
|
||||||
|
<node>
|
||||||
|
<interface name="org.project.Bar.Frobnicator">
|
||||||
|
<method name="RandomMethod"/>
|
||||||
|
</interface>
|
||||||
|
</node>
|
||||||
|
"""
|
||||||
|
res = self.runCodegenWithInterface(
|
||||||
|
xml_contents,
|
||||||
|
"--generate-docbook",
|
||||||
|
"test",
|
||||||
|
)
|
||||||
|
self.assertEqual("", res.err)
|
||||||
|
self.assertEqual("", res.out)
|
||||||
|
with open("test-org.project.Bar.Frobnicator.xml", "r") as f:
|
||||||
|
xml_data = f.readlines()
|
||||||
|
self.assertTrue(len(xml_data) != 0)
|
||||||
|
|
||||||
def test_generate_rst(self):
|
def test_generate_rst(self):
|
||||||
"""Test the basic functionality of the rst generator."""
|
"""Test the basic functionality of the rst generator."""
|
||||||
xml_contents = """
|
xml_contents = """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user