summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2013-01-17 12:36:17 -0800
committerJohn Wiegley <johnw@newartisans.com>2013-01-17 12:36:17 -0800
commit83bd3234d32d7a82d583e4f50f8f90837aa15a93 (patch)
tree3690c573e3c02dad77874a3e76c32344f5eb0be6 /test/regress
parent74a1f63efbb5703e417e05466aca2ae51268862e (diff)
parent3fe2ef59566ef679d9de58e5f9454b7443d9153a (diff)
downloadfork-ledger-83bd3234d32d7a82d583e4f50f8f90837aa15a93.tar.gz
fork-ledger-83bd3234d32d7a82d583e4f50f8f90837aa15a93.tar.bz2
fork-ledger-83bd3234d32d7a82d583e4f50f8f90837aa15a93.zip
Merge pull request #123 from kljohann/bug.788
change handling of standard input
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/BF3C1F82-2.test12
-rw-r--r--test/regress/BF3C1F82.test19
2 files changed, 31 insertions, 0 deletions
diff --git a/test/regress/BF3C1F82-2.test b/test/regress/BF3C1F82-2.test
new file mode 100644
index 00000000..453151ce
--- /dev/null
+++ b/test/regress/BF3C1F82-2.test
@@ -0,0 +1,12 @@
+; 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
diff --git a/test/regress/BF3C1F82.test b/test/regress/BF3C1F82.test
new file mode 100644
index 00000000..50f4106f
--- /dev/null
+++ b/test/regress/BF3C1F82.test
@@ -0,0 +1,19 @@
+; 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