From 26e1db651e18fd65fe7374b404a30e20f601969f Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 4 Sep 2019 20:44:24 +0200 Subject: Allow preprocessor user functions to access the parsing location Just requires making Kconfig.filename/linenr public. 'lineno' would be a more standard name, but be consistent with MenuNode.linenr. --- testsuite.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuite.py') diff --git a/testsuite.py b/testsuite.py index 3a6a3a6..93e85d6 100644 --- a/testsuite.py +++ b/testsuite.py @@ -2589,6 +2589,11 @@ config PRINT_ME_TOO verify_variable("one-or-more-three", "$(one-or-more,foo,bar,baz)", "foo + bar,baz", True) + verify_variable("location-1", "Kconfiglib/tests/Kuserfunctions:13", + "Kconfiglib/tests/Kuserfunctions:13", False) + verify_variable("location-2", "Kconfiglib/tests/Kuserfunctions:14", + "Kconfiglib/tests/Kuserfunctions:14", False) + def verify_bad_argno(name): try: c.variables[name].expanded_value -- cgit v1.2.3