diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-08 14:26:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-09 16:35:40 +0100 |
commit | 11ee8371d588b3bf4430fe80d131deaddb4e3699 (patch) | |
tree | 97215753b6aa317d6dc210aeef6ee1cc11d13c70 /rtemsspec/tests/test_content_sphinx.py | |
parent | spec: Update X/STRING and adding ALIGNOF specs (diff) | |
download | rtems-central-11ee8371d588b3bf4430fe80d131deaddb4e3699.tar.bz2 |
sphinxcontent: Add add_simple_table()
Diffstat (limited to 'rtemsspec/tests/test_content_sphinx.py')
-rw-r--r-- | rtemsspec/tests/test_content_sphinx.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/rtemsspec/tests/test_content_sphinx.py b/rtemsspec/tests/test_content_sphinx.py index e45703a9..f9235089 100644 --- a/rtemsspec/tests/test_content_sphinx.py +++ b/rtemsspec/tests/test_content_sphinx.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-2-Clause """ Unit tests for the rtemsspec.sphinxcontent module. """ -# Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +# Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -270,6 +270,22 @@ def test_comment(): """ +def test_simple_table(): + content = SphinxContent() + content.add_simple_table([]) + assert str(content) == "" + content.add_simple_table([["a", "b"], ["cc", "ddd"]]) + assert str(content) == """.. table:: + :class: longtable + + == === + a b + == === + cc ddd + == === +""" + + def test_substitute(tmpdir): config = create_item_cache_config_and_copy_spec(tmpdir, "spec-sphinx", |