summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfiglib.py4
-rw-r--r--testsuite.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 8112e11..55d08f6 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -5652,7 +5652,9 @@ def standard_sc_expr_str(sc):
See expr_str().
"""
if sc.__class__ is Symbol:
- return '"{}"'.format(escape(sc.name)) if sc.is_constant else sc.name
+ if sc.is_constant and sc.name not in ("n", "m", "y"):
+ return '"{}"'.format(escape(sc.name))
+ return sc.name
# Choice
return "<choice {}>".format(sc.name) if sc.name else "<choice>"
diff --git a/testsuite.py b/testsuite.py
index f3f2b42..8a66567 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -807,16 +807,16 @@ comment "advanced comment"
config DEP_REM_CORNER_CASES
bool
default A
- depends on "n"
+ depends on n
config DEP_REM_CORNER_CASES
bool
- default B if "n"
+ default B if n
config DEP_REM_CORNER_CASES
bool
default C
- depends on "m" && MODULES
+ depends on m && MODULES
config DEP_REM_CORNER_CASES
bool
@@ -1257,10 +1257,10 @@ tests/Krecursive2:1
c = Kconfig("Kconfiglib/tests/Kdirdep")
- verify_equal(expr_str(c.syms["NO_DEP_SYM"].direct_dep), '"y"')
+ verify_equal(expr_str(c.syms["NO_DEP_SYM"].direct_dep), 'y')
verify_equal(expr_str(c.syms["DEP_SYM"].direct_dep), "A || (B && C) || !D")
- verify_equal(expr_str(c.named_choices["NO_DEP_CHOICE"].direct_dep), '"y"')
+ verify_equal(expr_str(c.named_choices["NO_DEP_CHOICE"].direct_dep), 'y')
verify_equal(expr_str(c.named_choices["DEP_CHOICE"].direct_dep),
"A || B || C")