summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2015-06-09 14:28:28 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2015-06-09 14:28:28 +0200
commit0f4882ba3d329005d80b4426688b231381eba5c2 (patch)
treecb86ed145d3766dc3e54afa4faf4b06bb7c3ac5e
parent7eace27993ad3aa1d6911866d9c60a11f32d36d9 (diff)
Verify that indented .config assignments are ignored.
-rw-r--r--tests/Kappend4
-rw-r--r--tests/config_indented3
-rw-r--r--testsuite.py6
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()
#