summaryrefslogtreecommitdiff
path: root/tests/Kmisc
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-01-05 20:37:00 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-01-05 21:38:57 +0100
commit5d693b2e66451aedfd694ffde4dba7d4b74afa46 (patch)
treec35c01fe21902cf6c7814707ef9f200c5f0c5818 /tests/Kmisc
parent5e2103cf37181067cbdff1a16647edddf60441f0 (diff)
Don't write out 'option env' symbols to C header
Oversight. SYMBOL_AUTO (env_var) being set indirectly clears SYMBOL_WRITE (_write_to_conf) in sym_calc_value(). The .config case was already fine due to an explicit env_var check. Even non-visible env. symbols ended up in the header, due to 'option env' internally adding a default. Disallow user values altogether on 'option env' symbols, even if specified manually. This matches the C implementation. Add a warning too.
Diffstat (limited to 'tests/Kmisc')
-rw-r--r--tests/Kmisc10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/Kmisc b/tests/Kmisc
index 44fdfdc..9da57a4 100644
--- a/tests/Kmisc
+++ b/tests/Kmisc
@@ -61,12 +61,18 @@ menu "menu"
endmenu
config FROM_ENV
- string
+ string "from env"
option env="ENV_VAR"
config FROM_ENV_MISSING
- string
+ string "from env missing"
option env="MISSING_ENV_VAR"
+ default "missing"
+
+config FROM_ENV_WEIRD
+ string
+ default "weird"
+ option env="ENV_VAR"
config NOT_ALLNOCONFIG_Y
bool "not allnoconfig_y"