From 11ee8371d588b3bf4430fe80d131deaddb4e3699 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 8 Mar 2021 14:26:51 +0100 Subject: sphinxcontent: Add add_simple_table() --- rtemsspec/tests/test_content_sphinx.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'rtemsspec/tests/test_content_sphinx.py') 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", -- cgit v1.2.3