diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-07-18 03:05:37 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-07-18 03:23:43 +0200 |
| commit | e08b6957ca935fc97eddd1afda933715016b9b11 (patch) | |
| tree | 4f600c0b1f7956b95125b385565f4a68588bad66 /testsuite.py | |
| parent | 3bd823958bb2bbe651b89647202a2a1ef6875815 (diff) | |
Add def_int, def_hex, and def_string keywords
Analogous to def_bool and def_tristate, setting the type and adding a
default at the same time.
This is a Kconfiglib extension. These keywords can be useful in projects
that make use of symbols defined in multiple locations, and remove some
Kconfig inconsistency.
Diffstat (limited to 'testsuite.py')
| -rw-r--r-- | testsuite.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/testsuite.py b/testsuite.py index 0f42d69..f70c7e9 100644 --- a/testsuite.py +++ b/testsuite.py @@ -467,7 +467,7 @@ def run_selftests(): verify_eval_bad("|| X") - print("Testing Symbol.__str__()") + print("Testing Symbol.__str__() and def_{int,hex,string}") def verify_str(item, s): verify_equal(str(item), s[1:]) @@ -545,6 +545,16 @@ config INT range 1 2 range FOO BAR range BAZ QAZ if DEP + default 7 if DEP +""") + + verify_str(c.syms["HEX"], """ +config HEX + hex + range 0x100 0x200 + range FOO BAR + range BAZ QAZ if DEP + default 0x123 """) verify_str(c.modules, """ |
