aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/tests/auto_submenu/__init__.py
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-03-13 18:12:05 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-03-26 02:04:02 +0900
commit49ac3c0c3aa3b7636961b72a40ddb03e6609f594 (patch)
tree429d8f2f9f50fa1d065f24ace81f9597ccee1e1c /scripts/kconfig/tests/auto_submenu/__init__.py
parent1903c511905984685e0a299421bc4c8b6fc1344b (diff)
downloadlinux-stericsson-49ac3c0c3aa3b7636961b72a40ddb03e6609f594.tar.gz
kconfig: tests: test automatic submenu creation
If a symbols has dependency on the preceding symbol, the menu entry should become the submenu of the preceding one, and displayed with deeper indentation. This is done by restructuring the menu tree in menu_finalize(). It is a bit complicated computation, so let's add a test case. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
Diffstat (limited to 'scripts/kconfig/tests/auto_submenu/__init__.py')
-rw-r--r--scripts/kconfig/tests/auto_submenu/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/kconfig/tests/auto_submenu/__init__.py b/scripts/kconfig/tests/auto_submenu/__init__.py
new file mode 100644
index 000000000000..32e79b85faeb
--- /dev/null
+++ b/scripts/kconfig/tests/auto_submenu/__init__.py
@@ -0,0 +1,12 @@
+"""
+Create submenu for symbols that depend on the preceding one.
+
+If a symbols has dependency on the preceding symbol, the menu entry
+should become the submenu of the preceding one, and displayed with
+deeper indentation.
+"""
+
+
+def test(conf):
+ assert conf.oldaskconfig() == 0
+ assert conf.stdout_contains('expected_stdout')