summaryrefslogtreecommitdiff
path: root/tests/Kassignable
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-11-09 11:43:13 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2017-11-09 11:43:13 +0100
commit395c2db0e9761def8eb992e3e8068ba2d3ab179c (patch)
tree7b14ac791dbf9d4b9354f1c6149444e090068309 /tests/Kassignable
parent8c978ee0b9c0f7f8406f58d24478a73330512056 (diff)
parent4bffd653148d6fa1c8e626872ae4f445e2b0a24c (diff)
Make Kconfiglib 2 official
Merge in the 'kconfiglib-2-backup' branch.
Diffstat (limited to 'tests/Kassignable')
-rw-r--r--tests/Kassignable229
1 files changed, 229 insertions, 0 deletions
diff --git a/tests/Kassignable b/tests/Kassignable
new file mode 100644
index 0000000..f134a74
--- /dev/null
+++ b/tests/Kassignable
@@ -0,0 +1,229 @@
+config MODULES
+ bool "modules"
+ option modules
+
+
+# Things that should never be .assignable
+
+if UNDEFINED && "const"
+endif
+
+config NO_PROMPT
+
+config STRING
+ string "string"
+
+config INT
+ int "int"
+
+config HEX
+ hex "hex"
+
+
+# Non-selected symbols
+
+config Y_VIS_BOOL
+ bool "y-vis bool"
+
+config M_VIS_BOOL
+ bool "m-vis bool" if m
+
+config N_VIS_BOOL
+ bool "n-vis bool" if n
+
+config Y_VIS_TRI
+ tristate "y-vis tri"
+
+config M_VIS_TRI
+ tristate "m-vis tri" if m
+
+config N_VIS_TRI
+ tristate "n-vis tri" if n
+
+
+# Symbols selected to y
+
+config Y_SELECTOR
+ def_tristate y
+
+ select Y_SEL_Y_VIS_BOOL
+ select Y_SEL_M_VIS_BOOL
+ select Y_SEL_N_VIS_BOOL
+
+ select Y_SEL_Y_VIS_TRI
+ select Y_SEL_M_VIS_TRI
+ select Y_SEL_N_VIS_TRI
+
+config Y_SEL_Y_VIS_BOOL
+ bool "y-sel y-vis bool"
+
+config Y_SEL_M_VIS_BOOL
+ bool "y-sel m-vis bool" if m
+
+config Y_SEL_N_VIS_BOOL
+ bool "y-sel n-vis bool" if n
+
+config Y_SEL_Y_VIS_TRI
+ tristate "y-sel y-vis tri"
+
+config Y_SEL_M_VIS_TRI
+ tristate "y-sel m-vis tri" if m
+
+config Y_SEL_N_VIS_TRI
+ tristate "y-sel n-vis tri" if n
+
+
+# Symbols selected to m
+
+config M_SELECTOR
+ def_tristate m
+
+ select M_SEL_Y_VIS_BOOL
+ select M_SEL_M_VIS_BOOL
+ select M_SEL_N_VIS_BOOL
+
+ select M_SEL_Y_VIS_TRI
+ select M_SEL_M_VIS_TRI
+ select M_SEL_N_VIS_TRI
+
+config M_SEL_Y_VIS_BOOL
+ bool "m-sel y-vis bool"
+
+config M_SEL_M_VIS_BOOL
+ bool "m-sel m-vis bool" if m
+
+config M_SEL_N_VIS_BOOL
+ bool "m-sel n-vis bool" if n
+
+config M_SEL_Y_VIS_TRI
+ tristate "m-sel y-vis tri"
+
+config M_SEL_M_VIS_TRI
+ tristate "m-sel m-vis tri" if m
+
+config M_SEL_N_VIS_TRI
+ tristate "m-sel n-vis tri" if n
+
+
+# Symbols implied to y
+
+config Y_IMPLIER
+ def_tristate y
+
+ imply Y_IMP_Y_VIS_BOOL
+ imply Y_IMP_M_VIS_BOOL
+ imply Y_IMP_N_VIS_BOOL
+
+ imply Y_IMP_Y_VIS_TRI
+ imply Y_IMP_M_VIS_TRI
+ imply Y_IMP_N_VIS_TRI
+
+config Y_IMP_Y_VIS_BOOL
+ bool "y-imp y-vis bool"
+
+config Y_IMP_M_VIS_BOOL
+ bool "y-imp m-vis bool" if m
+
+config Y_IMP_N_VIS_BOOL
+ bool "y-imp n-vis bool" if n
+
+config Y_IMP_Y_VIS_TRI
+ tristate "y-imp y-vis tri"
+
+config Y_IMP_M_VIS_TRI
+ tristate "y-imp m-vis tri" if m
+
+config Y_IMP_N_VIS_TRI
+ tristate "y-imp n-vis tri" if n
+
+
+# Symbols implied to m (never affects assignable values)
+
+config M_IMPLIER
+ def_tristate m
+
+ imply M_IMP_Y_VIS_BOOL
+ imply M_IMP_M_VIS_BOOL
+ imply M_IMP_N_VIS_BOOL
+
+ imply M_IMP_Y_VIS_TRI
+ imply M_IMP_M_VIS_TRI
+ imply M_IMP_N_VIS_TRI
+
+config M_IMP_Y_VIS_BOOL
+ bool "m-imp y-vis bool"
+
+config M_IMP_M_VIS_BOOL
+ bool "m-imp m-vis bool" if m
+
+config M_IMP_N_VIS_BOOL
+ bool "m-imp n-vis bool" if n
+
+config M_IMP_Y_VIS_TRI
+ tristate "m-imp y-vis tri"
+
+config M_IMP_M_VIS_TRI
+ tristate "m-imp m-vis tri" if m
+
+config M_IMP_N_VIS_TRI
+ tristate "m-imp n-vis tri" if n
+
+
+# Symbols in y-mode choice
+
+choice Y_CHOICE
+ bool "y-mode choice"
+
+config Y_CHOICE_BOOL
+ bool "y-mode choice bool"
+
+config Y_CHOICE_TRISTATE
+ tristate "y-mode choice tristate"
+
+config Y_CHOICE_N_VIS_TRISTATE
+ tristate "y-mode choice tristate invisible" if n
+
+endchoice
+
+
+# Symbols in m/y-mode choice
+
+choice MY_CHOICE
+ tristate "m/y-mode choice"
+
+config MY_CHOICE_BOOL
+ bool "m/y-mode choice bool"
+
+config MY_CHOICE_TRISTATE
+ tristate "m/y-mode choice tristate"
+
+config MY_CHOICE_N_VIS_TRISTATE
+ tristate "m/y-mode choice tristate invisible" if n
+
+endchoice
+
+
+# Choices with some other possible modes
+
+choice NMY_CHOICE
+ tristate "n/m/y-mode choice"
+ optional
+endchoice
+
+choice NY_CHOICE
+ bool "n/y-mode choice"
+ optional
+endchoice
+
+choice NM_CHOICE
+ tristate "n/m-mode choice" if m
+ optional
+endchoice
+
+choice M_CHOICE
+ tristate "m-mode choice" if m
+endchoice
+
+choice N_CHOICE
+ tristate "n-mode choice" if n
+endchoice