From 0cebc87848210bf99993527694bb96efe45b9598 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 15 Jun 2015 22:10:19 +0200 Subject: Report correct locations in the presence of continuation lines. The line number was previously for logical lines only. Oversight. Get rid of _get_lines() and keep the raw lines in _FileFeed instead, only joining lines with continuation lines as they are fetched. This makes the index correspond to the correct line number from the file. (It also means most lines are returned as-is without any logic applied to them, which is nice.) Litter tests/Klocation with continuation lines to get test coverage. Remove some unused functions that were previously inherited from _Feed and remove it as a base class of _FileFeed. --- tests/Klocation | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'tests/Klocation') diff --git a/tests/Klocation b/tests/Klocation index e445deb..76a886b 100644 --- a/tests/Klocation +++ b/tests/Klocation @@ -1,10 +1,15 @@ +# Include some line continuations to make sure they don't mess up line numbers + # Defined and referenced in multiple locations config A bool +# Throw in some line continuations too to make sure it doesn't mess up the line +# numbers menu "menu 1" depends on A - visible if A && NOT_DEFINED + visible if A && \ + NOT_DEFINED # Also defined in Klocation_included choice B @@ -16,6 +21,8 @@ config C config D bool "d" +\ + endchoice config A @@ -29,16 +36,29 @@ config E endmenu -config FOO +config \ + FOO string - option env="FOO" + option \ + env\ + =\ + "FOO" + +\ +\ config BAR string - default "_included" + default \ + "_included" # Expands to "tests/Klocation_included" -source "$FOO/Klocation$BAR" +source \ +"$FOO/Klocation$BAR" + +\ +\ +\ config I int -- cgit v1.2.3