For `-f /dev/stdin`, the `pathname` of the parsing context will be empty as for any other streamed input. `instance_t::include_directive` did not work as expected for `-f /dev/stdin` and relative file names. One would expect them to be relative to the current directory rather than `/dev`. This will lead to `While parsing file ""` messages. This could be adjusted to read `While parsing standard input`, but maybe it's not worth the special cases. This commit also fixes bug 788: behaviour of source_context for '-f -'
19 lines
403 B
Text
19 lines
403 B
Text
; Check that error reporting works for "-f -"
|
|
|
|
2012/02/30 * Test
|
|
a 1
|
|
b
|
|
test -f - reg -> 1
|
|
__ERROR__
|
|
While parsing file "", line 3:
|
|
While parsing transaction:
|
|
<no source context>
|
|
Error: Day of month is not valid for year
|
|
end test
|
|
test -f /dev/stdin reg -> 1
|
|
__ERROR__
|
|
While parsing file "", line 3:
|
|
While parsing transaction:
|
|
<no source context>
|
|
Error: Day of month is not valid for year
|
|
end test
|