summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2018-01-27 15:55:08 +0800
committerGitHub <noreply@github.com>2018-01-27 15:55:08 +0800
commit1be23f1653724b4e7a197662bc5418c5996b1136 (patch)
tree9082cb9059a01cf380bd7c51f09f1b4aff517d02 /test
parentc6c328c011d7e31121a585596833d2dd951302ce (diff)
parent1070c17f8c8933b6b243dbcb5fefabb26e0afcba (diff)
downloadfork-ledger-1be23f1653724b4e7a197662bc5418c5996b1136.tar.gz
fork-ledger-1be23f1653724b4e7a197662bc5418c5996b1136.tar.bz2
fork-ledger-1be23f1653724b4e7a197662bc5418c5996b1136.zip
Merge pull request #521 from mbudde/fix-trim
Fix handling of edge cases in trim function
Diffstat (limited to 'test')
-rw-r--r--test/regress/GH520.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/regress/GH520.test b/test/regress/GH520.test
new file mode 100644
index 00000000..54dd2299
--- /dev/null
+++ b/test/regress/GH520.test
@@ -0,0 +1,33 @@
+2009-01-01 * Jan 09
+ A 100.00 EUR
+ B
+
+test reg --format '%(trim(""))\n'
+
+
+end test
+
+test reg --format '%(trim("a"))\n'
+a
+a
+end test
+
+test reg --format '%(trim(" a"))\n'
+a
+a
+end test
+
+test reg --format '%(trim("a "))\n'
+a
+a
+end test
+
+test reg --format '%(trim(" a "))\n'
+a
+a
+end test
+
+test reg --format '%(trim(" aa "))\n'
+aa
+aa
+end test