From 2150732d5d28b6b7fa9a6805e173f16984c6f4dc Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 11 Dec 2012 04:27:22 +0100 Subject: Make location query selftests more comprehensive. Also sneak in testing of env. variable expansion, named choices, and 'base_dir'. --- tests/Klocation | 33 ++++++++++++++++++++++++++++++--- tests/Klocation_included | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 tests/Klocation_included (limited to 'tests') diff --git a/tests/Klocation b/tests/Klocation index e2e0c7c..e445deb 100644 --- a/tests/Klocation +++ b/tests/Klocation @@ -1,20 +1,47 @@ # Defined and referenced in multiple locations config A bool -menu "foo" + +menu "menu 1" depends on A visible if A && NOT_DEFINED + +# Also defined in Klocation_included choice B - bool "b" + bool "b" if A + config C bool "c" + config D bool "d" + endchoice + config A def_bool NOT_DEFINED -comment "foo" + +comment "comment 1" + config E bool "E" if A depends on A + endmenu + +config FOO + string + option env="FOO" + +config BAR + string + default "_included" + +# Expands to "tests/Klocation_included" +source "$FOO/Klocation$BAR" + +config I + int + range A 0 + range 0 A + range 0 1 if A diff --git a/tests/Klocation_included b/tests/Klocation_included new file mode 100644 index 0000000..8b0e8a9 --- /dev/null +++ b/tests/Klocation_included @@ -0,0 +1,35 @@ +menuconfig A + bool "A" +menuconfig A + bool "A" +menu "menu 2" +config M + def_bool !(n || (n || A = n)) + default !A if y + default y if !A +config S + bool + select A if NOT_DEFINED = y + select E if A +endmenu +choice + bool "C" +config N + bool "N" +config O + bool "O" +endchoice +choice B + bool "B" + +config B1 + tristate "B1" + +config B2 + tristate "B2" + +endchoice + +if !(NOT_DEFINED != A) +comment "comment 2" +endif -- cgit v1.2.3