From 1070c17f8c8933b6b243dbcb5fefabb26e0afcba Mon Sep 17 00:00:00 2001 From: Michael Budde Date: Thu, 25 Jan 2018 21:14:10 +0100 Subject: Fix handling of edge cases in trim function Fixes #520 --- test/regress/GH520.test | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test/regress/GH520.test (limited to 'test/regress/GH520.test') 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 -- cgit v1.2.3