ledger/test/regress/BF3C1F82-2.test
Johann Klähn 3fe2ef5956 change handling of standard input
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 -'
2013-01-17 12:19:23 +01:00

12 lines
408 B
Text

; Check that include directives are relative for "-f /dev/stdin"
include non-existent-ledger-file-BF3C1F82
test -f - reg -> 1
__ERROR__
While parsing file "", line 2:
Error: File to include was not found: "./non-existent-ledger-file-BF3C1F82"
end test
test -f /dev/stdin reg -> 1
__ERROR__
While parsing file "", line 2:
Error: File to include was not found: "./non-existent-ledger-file-BF3C1F82"
end test