summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkanreki <32443233+kanreki@users.noreply.github.com>2021-09-14 12:15:53 -0700
committerJohn Wiegley <johnw@newartisans.com>2021-12-08 16:17:17 -0800
commit586abd208221761a6c93bc4568513e9cd4dc287d (patch)
treed3d6c8da7e4584665bb705c25a91c5c66083de65 /test
parented5886921bcce0d1a261a37aa83bf135259b7d21 (diff)
downloadfork-ledger-586abd208221761a6c93bc4568513e9cd4dc287d.tar.gz
fork-ledger-586abd208221761a6c93bc4568513e9cd4dc287d.tar.bz2
fork-ledger-586abd208221761a6c93bc4568513e9cd4dc287d.zip
Use correct int return type for stream input operations
This makes it safe to compare results to -1 to indicate EOF, regardless of whether char is considered signed or unsigned; and so eliminates compiler warnings on platforms such as ARM. Fixes bug #2058.
Diffstat (limited to 'test')
-rw-r--r--test/regress/2058_1.test8
-rw-r--r--test/regress/2058_2.test11
2 files changed, 19 insertions, 0 deletions
diff --git a/test/regress/2058_1.test b/test/regress/2058_1.test
new file mode 100644
index 00000000..06043007
--- /dev/null
+++ b/test/regress/2058_1.test
@@ -0,0 +1,8 @@
+2021/1/2 Test
+ A $1.00
+ B
+
+test -p 'last %^@' bal -> 1
+__ERROR__
+Error: Invalid char '%'
+end test
diff --git a/test/regress/2058_2.test b/test/regress/2058_2.test
new file mode 100644
index 00000000..3c6c2a7e
--- /dev/null
+++ b/test/regress/2058_2.test
@@ -0,0 +1,11 @@
+2021/1/2 Test
+ A $1.00
+ B
+
+test --limit 'date>=[2020/12/31' register A -> 1
+__ERROR__
+While parsing value expression:
+ (date>=[2020/12/31)&((account =~ /A/))
+
+Error: Missing ']'
+end test