From e1ccf19f9f5fc896dfeef15883d2cb455cbbb937 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 29 Oct 2019 16:41:03 +0100 Subject: Add public helpers for generating " (defined at ...)" strings Have Symbol/Choice.name_and_loc return strings like "MY_SYM (defined at foo:1, bar:2)" " (defined at foo:4)" I've added a function like that in at least four different scripts now, so that's probably a sign that it's a worthwhile helper. Clean up the tests/Klocation tests a bit while adding tests. --- tests/Klocation | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tests/Klocation') diff --git a/tests/Klocation b/tests/Klocation index f997055..3820a7b 100644 --- a/tests/Klocation +++ b/tests/Klocation @@ -1,10 +1,16 @@ if UNDEFINED endif -config SINGLE_DEF +config ONE_DEF bool -config MULTI_DEF +config TWO_DEF + bool + +config TWO_DEF + bool + +config MANY_DEF bool # Throw in some line continuations too to make sure it doesn't mess up the line @@ -34,9 +40,9 @@ config HELP_3 bar bool config \ -MULTI_DEF +MANY_DEF -config MULTI_DEF +config MANY_DEF endif endif @@ -69,4 +75,4 @@ orsource "nonexistent*" grsource "nonexistent" grsource "nonexistent*" -config MULTI_DEF +config MANY_DEF -- cgit v1.2.3