summaryrefslogtreecommitdiffstats
path: root/rtemsspec/tests/test_content_sphinx.py
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsspec/tests/test_content_sphinx.py')
-rw-r--r--rtemsspec/tests/test_content_sphinx.py18
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",