diff options
| -rw-r--r-- | tests/Kappend | 4 | ||||
| -rw-r--r-- | tests/config_indented | 3 | ||||
| -rw-r--r-- | testsuite.py | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/tests/Kappend b/tests/Kappend index c084310..ce1478f 100644 --- a/tests/Kappend +++ b/tests/Kappend @@ -6,3 +6,7 @@ config BOOL config STRING string "string" + +config IGNOREME + bool "ignore me" + default y diff --git a/tests/config_indented b/tests/config_indented new file mode 100644 index 0000000..d57d8b4 --- /dev/null +++ b/tests/config_indented @@ -0,0 +1,3 @@ +# Indented assignments should be ignored to be compatible with the C +# implementation + CONFIG_IGNOREME=n diff --git a/testsuite.py b/testsuite.py index 4b35474..fbd4485 100644 --- a/testsuite.py +++ b/testsuite.py @@ -1345,10 +1345,14 @@ def run_selftests(): verify_value("BOOL", "n") verify_value("STRING", "foo bar") - # Loading a completely empty .config should also reset values + # Loading a completely empty .config should reset values c.load_config("Kconfiglib/tests/empty") verify_value("STRING", "") + # An indented assignment in a .config should be ignored + c.load_config("Kconfiglib/tests/config_indented") + verify_value("IGNOREME", "y") + # # get_config() # |
