diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-19 10:13:41 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-28 10:38:23 +0200 |
commit | 726e6a21929065355d4002ac46a71e215fe98ee2 (patch) | |
tree | 8d9d734710c0bc6662d25fd571c8d2bb94994493 /rtemsqual/tests/test_content_sphinx.py | |
parent | content: Add SphinxContent.get_section_label() (diff) | |
download | rtems-central-726e6a21929065355d4002ac46a71e215fe98ee2.tar.bz2 |
content: Add SphinxContent.section()
Diffstat (limited to 'rtemsqual/tests/test_content_sphinx.py')
-rw-r--r-- | rtemsqual/tests/test_content_sphinx.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/rtemsqual/tests/test_content_sphinx.py b/rtemsqual/tests/test_content_sphinx.py index ae87942a..c4c86317 100644 --- a/rtemsqual/tests/test_content_sphinx.py +++ b/rtemsqual/tests/test_content_sphinx.py @@ -96,6 +96,28 @@ yz w """ +def test_section(): + content = SphinxContent() + with content.section("ab cd") as label: + content.add(label) + with content.section("ef gh") as label2: + content.add(label2) + assert str(content) == """.. _SectionAbCd: + +ab cd +===== + +SectionAbCd + +.. _SectionEfGh: + +ef gh +----- + +SectionEfGh +""" + + def test_append(): sc = SphinxContent() sc.append("x") |