From 5e54e2cd43c5f3c530706291d860ba1bf817986c Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 7 Jun 2015 06:07:19 +0200 Subject: Unset user values when loading a zero-byte .config. Minor bug due to an early return from load_config(). Piggyback a refactoring of the code. Reading the header is unlikely to be performance-sensitive. Add a testcase too. --- testsuite.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'testsuite.py') diff --git a/testsuite.py b/testsuite.py index e225cbb..3407e0a 100644 --- a/testsuite.py +++ b/testsuite.py @@ -1333,6 +1333,10 @@ def run_selftests(): verify_value("BOOL", "n") verify_value("STRING", "foo bar") + # Loading a completely empty .config should also reset values + c.load_config("Kconfiglib/tests/empty") + verify_value("STRING", "") + # # get_config() # -- cgit v1.2.3