diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-15 22:10:19 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-15 23:29:09 +0200 |
| commit | 0cebc87848210bf99993527694bb96efe45b9598 (patch) | |
| tree | edee507756373a92817d7174d099c54dbf6d869d /tests/Klocation | |
| parent | ce80cb14127ff5d592f0d8875a4eb781c6048d04 (diff) | |
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.
Diffstat (limited to 'tests/Klocation')
| -rw-r--r-- | tests/Klocation | 30 |
1 files changed, 25 insertions, 5 deletions
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 |
