diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-03 05:19:54 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-03 05:27:17 +0100 |
| commit | b74cd303f763fbdc1307830b6333354d65733ef8 (patch) | |
| tree | 53618a9863dfc88dfdd944e3a3ff94a2ede95b1b | |
| parent | b59b618a0ce85632742ff92a5be2bab690a75e42 (diff) | |
Test .assignable for imply, find C menuconfig bug
A tristate implied to y can't be set to m. Other than that, imply
doesn't affect assignable values.
Fix some copy-paste type errors too.
In the C menuconfig, a tristate with m visibility implied to y gets
stuck if you change it with space. Look into that later. Test case:
config MODULES
def_bool y
option modules
config Y_IMPLIER
def_tristate y
imply Y_IMP_M_VIS_TRI
config Y_IMP_M_VIS_TRI
tristate "y-imp m-vis tri" if m
| -rw-r--r-- | tests/Kassignable | 68 | ||||
| -rw-r--r-- | testsuite.py | 16 |
2 files changed, 82 insertions, 2 deletions
diff --git a/tests/Kassignable b/tests/Kassignable index 97cb322..e600a39 100644 --- a/tests/Kassignable +++ b/tests/Kassignable @@ -67,10 +67,10 @@ config Y_SEL_Y_VIS_TRI tristate "y-sel y-vis tri" config Y_SEL_M_VIS_TRI - bool "y-sel m-vis tri" if m + tristate "y-sel m-vis tri" if m config Y_SEL_N_VIS_TRI - bool "y-sel n-vis tri" if n + tristate "y-sel n-vis tri" if n # Symbols selected to m @@ -103,3 +103,67 @@ config M_SEL_M_VIS_TRI 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 diff --git a/testsuite.py b/testsuite.py index 11d3ef6..17c7f9e 100644 --- a/testsuite.py +++ b/testsuite.py @@ -918,6 +918,22 @@ g verify_assignable("M_SEL_M_VIS_TRI", (1 ,)) verify_assignable("M_SEL_N_VIS_TRI", ( )) + # Symbols implied to y + verify_assignable("Y_IMP_Y_VIS_BOOL", (0, 2)) + verify_assignable("Y_IMP_M_VIS_BOOL", (0, 2)) # Visibility promoted + verify_assignable("Y_IMP_N_VIS_BOOL", ( )) + verify_assignable("Y_IMP_Y_VIS_TRI", (0, 2)) # m removed by imply + verify_assignable("Y_IMP_M_VIS_TRI", (0, 2)) # m promoted to y by imply + verify_assignable("Y_IMP_N_VIS_TRI", ( )) + + # Symbols implied to m (never affects assignable values) + verify_assignable("M_IMP_Y_VIS_BOOL", (0, 2)) + verify_assignable("M_IMP_M_VIS_BOOL", (0, 2)) # Visibility promoted + verify_assignable("M_IMP_N_VIS_BOOL", ( )) + verify_assignable("M_IMP_Y_VIS_TRI", (0, 1, 2)) # m removed by imply + verify_assignable("M_IMP_M_VIS_TRI", (0, 1 )) # m promoted to y by imply + verify_assignable("M_IMP_N_VIS_TRI", ( )) + print("Testing object relations") |
