From 0f4882ba3d329005d80b4426688b231381eba5c2 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 9 Jun 2015 14:28:28 +0200 Subject: Verify that indented .config assignments are ignored. --- tests/Kappend | 4 ++++ tests/config_indented | 3 +++ testsuite.py | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/config_indented 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() # -- cgit v1.2.3