diff options
author | John Wiegley <johnw@fpcomplete.com> | 2013-01-16 18:10:30 -0600 |
---|---|---|
committer | John Wiegley <johnw@fpcomplete.com> | 2013-01-16 18:10:30 -0600 |
commit | d1c96190e9549267782704eab991bf304d3f86e2 (patch) | |
tree | 82f01ed98a29a4f74e27a43ca71f1f350fdc9bb2 | |
parent | 24b791ad078e36cfd8f895544636320467aa70ce (diff) | |
download | fork-ledger-d1c96190e9549267782704eab991bf304d3f86e2.tar.gz fork-ledger-d1c96190e9549267782704eab991bf304d3f86e2.tar.bz2 fork-ledger-d1c96190e9549267782704eab991bf304d3f86e2.zip |
Revert "fix bug 788: behaviour of source_context for '-f -'"
This reverts commit 0a1ff035421d5f97675ad769a7fcdbc68399f3dc.
-rw-r--r-- | src/error.cc | 2 | ||||
-rw-r--r-- | src/session.cc | 1 | ||||
-rw-r--r-- | test/regress/BF3C1F82.test | 12 |
3 files changed, 1 insertions, 14 deletions
diff --git a/src/error.cc b/src/error.cc index d7e92daa..58339db7 100644 --- a/src/error.cc +++ b/src/error.cc @@ -84,7 +84,7 @@ string source_context(const path& file, const string& prefix) { const std::streamoff len = end_pos - pos; - if (! len || file == path("/dev/stdin") || file.empty()) + if (! len || file == path("/dev/stdin")) return _("<no source context>"); assert(len > 0); diff --git a/src/session.cc b/src/session.cc index a8bb628a..b6153203 100644 --- a/src/session.cc +++ b/src/session.cc @@ -159,7 +159,6 @@ std::size_t session_t::read_data(const string& master_account) shared_ptr<std::istream> stream(new std::istringstream(buffer.str())); parsing_context.push(stream); - parsing_context.get_current().pathname = "/dev/stdin"; } else { parsing_context.push(pathname); } diff --git a/test/regress/BF3C1F82.test b/test/regress/BF3C1F82.test deleted file mode 100644 index 8d465f4d..00000000 --- a/test/regress/BF3C1F82.test +++ /dev/null @@ -1,12 +0,0 @@ -; Check that error reporting works for "-f -" - -2012/02/30 * Test - a 1 - b -test -f - reg -> 1 -__ERROR__ -While parsing file "/dev/stdin", line 3: -While parsing transaction: -<no source context> -Error: Day of month is not valid for year -end test |