summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/convert.py2
-rw-r--r--test/regress/GH520.test33
2 files changed, 34 insertions, 1 deletions
diff --git a/test/convert.py b/test/convert.py
index 34152de2..2ac7a21b 100755
--- a/test/convert.py
+++ b/test/convert.py
@@ -3,7 +3,7 @@
# convert.py: This script converts a Boost.Test unit test into an
# equivalent Python unit test.
#
-# Copyright (c) 2003-2017, John Wiegley. All rights reserved.
+# Copyright (c) 2003-2018, John Wiegley. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
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