summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2012-12-13 12:08:46 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2012-12-13 12:08:46 +0100
commit6a0a86dd810f26f4fa38afb87dc8565c8e7aa8b2 (patch)
treebf8f264e761f4f4cbbaf6aee3aec771aba18ecc6 /tests
parentcec15de1755d89963537ea0c8dacd94118ce2ff3 (diff)
Add visibility selftests.
Diffstat (limited to 'tests')
-rw-r--r--tests/Kvisibility261
1 files changed, 261 insertions, 0 deletions
diff --git a/tests/Kvisibility b/tests/Kvisibility
new file mode 100644
index 0000000..5521863
--- /dev/null
+++ b/tests/Kvisibility
@@ -0,0 +1,261 @@
+config MODULES
+ bool "MODULES"
+
+#
+# Symbol visibility
+#
+
+config NO_PROMPT
+ bool
+
+# Not rewritten, so MOD will have the value 'y' when running without modules
+config MOD
+ def_tristate m
+
+config BOOL_n
+ bool "bool n" if n
+
+# Rewritten to m && MODULES
+config BOOL_m
+ bool "bool m" if m
+
+# Not rewritten
+config BOOL_MOD
+ bool "bool MOD"
+ depends on MOD
+
+# Rewritten to m && MODULES
+config BOOL_y
+ bool "bool y"
+ depends on y || m
+
+config TRISTATE_n
+ tristate "tristate n" if n
+
+# Rewritten to m && MODULES
+config TRISTATE_m
+ tristate "tristate m" if m
+
+# Not rewritten
+config TRISTATE_MOD
+ tristate "tristate MOD"
+ depends on MOD
+
+# Rewritten to m && MODULES
+config TRISTATE_y
+ bool "tristate y"
+ depends on y || m
+
+# Symbols nested in 'if'
+
+if n
+config BOOL_if_n
+ bool "bool if n"
+config TRISTATE_if_n
+ tristate "tristate if n"
+endif
+
+if m
+config BOOL_if_m
+ bool "bool if m"
+config TRISTATE_if_m
+ tristate "tristate if n"
+endif
+
+if y
+config BOOL_if_y
+ bool "bool if y"
+config TRISTATE_if_y
+ tristate "tristate if y"
+endif
+
+# Symbols nested in 'menu'
+
+menu "menu 1"
+ depends on n
+config BOOL_menu_n
+ bool "bool menu n"
+config TRISTATE_menu_n
+ tristate "tristate menu n"
+endmenu
+
+menu "menu 2"
+ depends on m
+config BOOL_menu_m
+ bool "bool menu m"
+config TRISTATE_menu_m
+ tristate "tristate menu n"
+endmenu
+
+menu "menu 3"
+ depends on y
+config BOOL_menu_y
+ bool "bool menu y"
+config TRISTATE_menu_y
+ tristate "tristate menu y"
+endmenu
+
+# Symbols nested in choices
+
+choice C1
+ tristate "choice n" if n
+config BOOL_choice_n
+ bool "bool choice n"
+config TRISTATE_choice_n
+ tristate "tristate choice n"
+endchoice
+
+choice C2
+ tristate "choice m" if m
+config BOOL_choice_m
+ bool "bool choice m"
+config TRISTATE_choice_m
+ tristate "tristate choice n"
+endchoice
+
+choice C3
+ tristate "choice y" if y
+config BOOL_choice_y
+ bool "bool choice y"
+config TRISTATE_choice_y
+ tristate "tristate choice y"
+endchoice
+
+#
+# Choice visibility
+#
+
+choice BOOL_CHOICE_n
+ bool "bool choice n" if n
+config A
+ bool "A"
+config B
+ bool "B"
+endchoice
+
+choice BOOL_CHOICE_m
+ bool "bool choice m" if m
+config C
+ bool "C"
+config D
+ bool "D"
+endchoice
+
+choice BOOL_CHOICE_y
+ bool "bool choice y" if y
+config E
+ bool "E"
+config F
+ bool "F"
+endchoice
+
+choice TRISTATE_CHOICE_n
+ tristate "tristate choice n" if n
+config G
+ tristate "G"
+config H
+ tristate "H"
+endchoice
+
+choice TRISTATE_CHOICE_m
+ tristate "tristate choice m" if m
+config I
+ tristate "I"
+config J
+ tristate "J"
+endchoice
+
+choice TRISTATE_CHOICE_y
+ tristate "tristate choice y" if y
+config K
+ tristate "K"
+config L
+ tristate "L"
+endchoice
+
+if m
+choice TRISTATE_CHOICE_IF_m_and_y
+ tristate "tristate choice if m and y" if y
+config M
+ bool "M"
+config N
+ bool "N"
+endchoice
+endif
+
+menu "choice-containing menu"
+ depends on n && y
+choice TRISTATE_CHOICE_MENU_n_and_y
+ tristate "tristate choice if n and y"
+config O
+ tristate "O"
+config P
+ tristate "P"
+endchoice
+endmenu
+
+#
+# Menu visibility
+#
+
+menu "menu n"
+ depends on n
+endmenu
+
+menu "menu m"
+ depends on m
+endmenu
+
+menu "menu y"
+ depends on y
+endmenu
+
+if n
+menu "menu if n"
+endmenu
+endif
+
+if m
+menu "menu if m"
+endmenu
+endif
+
+if y
+menu "menu if y"
+endmenu
+endif
+
+if m
+menu "menu if m and y"
+ depends on y
+endmenu
+endif
+
+#
+# Comment visibility
+#
+
+comment "comment n"
+ depends on n
+comment "comment m"
+ depends on m
+comment "comment y"
+ depends on y
+
+if n
+comment "comment if n"
+endif
+if m
+comment "comment if m"
+endif
+if y
+comment "comment if y"
+endif
+
+if "y"
+menu "comment-containing menu"
+ depends on m
+comment "double-nested m comment"
+ depends on y
+endmenu
+endif