From b59b618a0ce85632742ff92a5be2bab690a75e42 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 3 Nov 2017 03:17:58 +0100 Subject: Add initial selftests for .assignable Comprehensive selftests are important here, because the allno/yesconfig.py scripts only check the upper and lower bound, and allnoconfig disables modules. Found a bug for non-selected m-visible tristates, where n didn't show up in sym.assignable. Everything matches menuconfig after fixing that. Still need to test symbols in choices with different modes, imply, and .assignable for choices. --- tests/Kassignable | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 tests/Kassignable (limited to 'tests') diff --git a/tests/Kassignable b/tests/Kassignable new file mode 100644 index 0000000..97cb322 --- /dev/null +++ b/tests/Kassignable @@ -0,0 +1,105 @@ +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 + bool "y-sel m-vis tri" if m + +config Y_SEL_N_VIS_TRI + bool "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 -- cgit v1.2.3