From 506d521615677934afc53663aac44990bd28add4 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 18 Oct 2020 21:47:01 -0700 Subject: [PATCH] ;cli: more tests for #1363 --- tests/cli/date-options.test | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/cli/date-options.test b/tests/cli/date-options.test index d8b91f5e9..fc5e5f0ac 100644 --- a/tests/cli/date-options.test +++ b/tests/cli/date-options.test @@ -63,3 +63,20 @@ $ hledger -f- register date:2019-02 date:2019-01-01- # Smart dates https://github.com/simonmichael/hledger/issues/1079 $ hledger -f- activity -b 2019-02-01 -e 'next year' > /2019-02-01 \*/ + +# Date ranges +# Dotted range syntax, full dates +$ hledger -f- reg date:2019-01-01..2019-02-01 +2019-01-01 (a) 2 2 + +# Dotted range syntax, partial dates +$ hledger -f- reg date:2019-01..2019-02 +2019-01-01 (a) 2 2 + +# Dashed range syntax, full dates +$ hledger -f- reg date:2019-01-01-2019-02-01 +2019-01-01 (a) 2 2 + +# Dashed range syntax, partial dates +$ hledger -f- reg date:2019-01-2019-02 +2019-01-01 (a) 2 2