mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
match line endings used by parser and error reports
the parser treats a plain \r as a newline, error reports do not. this can lead to interesting divergences if anything makes use of this feature, with error reports pointing to wrong locations in the input (or even outside the input altogether).
This commit is contained in:
parent
1edd6fada5
commit
2be6b14328
8 changed files with 99 additions and 24 deletions
6
tests/functional/lang/eval-fail-eol-1.err.exp
Normal file
6
tests/functional/lang/eval-fail-eol-1.err.exp
Normal file
|
@ -0,0 +1,6 @@
|
|||
error: undefined variable 'invalid'
|
||||
at /pwd/lang/eval-fail-eol-1.nix:2:1:
|
||||
1| # foo
|
||||
2| invalid
|
||||
| ^
|
||||
3| # bar
|
3
tests/functional/lang/eval-fail-eol-1.nix
Normal file
3
tests/functional/lang/eval-fail-eol-1.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
# foo
|
||||
invalid
|
||||
# bar
|
6
tests/functional/lang/eval-fail-eol-2.err.exp
Normal file
6
tests/functional/lang/eval-fail-eol-2.err.exp
Normal file
|
@ -0,0 +1,6 @@
|
|||
error: undefined variable 'invalid'
|
||||
at /pwd/lang/eval-fail-eol-2.nix:2:1:
|
||||
1| # foo
|
||||
2| invalid
|
||||
| ^
|
||||
3| # bar
|
2
tests/functional/lang/eval-fail-eol-2.nix
Normal file
2
tests/functional/lang/eval-fail-eol-2.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
# foo
invalid
|
||||
# bar
|
6
tests/functional/lang/eval-fail-eol-3.err.exp
Normal file
6
tests/functional/lang/eval-fail-eol-3.err.exp
Normal file
|
@ -0,0 +1,6 @@
|
|||
error: undefined variable 'invalid'
|
||||
at /pwd/lang/eval-fail-eol-3.nix:2:1:
|
||||
1| # foo
|
||||
2| invalid
|
||||
| ^
|
||||
3| # bar
|
3
tests/functional/lang/eval-fail-eol-3.nix
Normal file
3
tests/functional/lang/eval-fail-eol-3.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
# foo
|
||||
invalid
|
||||
# bar
|
Loading…
Add table
Add a link
Reference in a new issue