From 64bc422b8584856ea7e5c402ba3a19ef913d5d04 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 16 May 2015 13:04:22 -0700 Subject: [PATCH] forgot to commit status tests --- tests/journal/status.test | 80 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 tests/journal/status.test diff --git a/tests/journal/status.test b/tests/journal/status.test new file mode 100644 index 000000000..53372defb --- /dev/null +++ b/tests/journal/status.test @@ -0,0 +1,80 @@ +# 1. the status field can contain nothing, +hledgerdev -f- print +<<< +2015/1/1 x + (a) 1 +>>> +2015/01/01 x + (a) 1 + +>>>=0 + +# 2. or ! +hledgerdev -f- print +<<< +2015/1/1 ! x + (a) 1 +>>> +2015/01/01 ! x + (a) 1 + +>>>=0 + +# 3. or * +hledgerdev -f- print +<<< +2015/1/1 * x + (a) 1 +>>> +2015/01/01 * x + (a) 1 + +>>>=0 + +# 4. --cleared matches * only +hledgerdev -f- print --cleared +<<< +2015/1/1 x + (a) 1 +2015/1/1 ! x + (b) 1 +2015/1/1 * x + (c) 1 +>>> +2015/01/01 * x + (c) 1 + +>>>=0 + +# 5. --pending matches ! only +hledgerdev -f- print --pending +<<< +2015/1/1 x + (a) 1 +2015/1/1 ! x + (b) 1 +2015/1/1 * x + (c) 1 +>>> +2015/01/01 ! x + (b) 1 + +>>>=0 + +# 6. --uncleared matches all except * +hledgerdev -f- print --uncleared +<<< +2015/1/1 x + (a) 1 +2015/1/1 ! x + (b) 1 +2015/1/1 * x + (c) 1 +>>> +2015/01/01 x + (a) 1 + +2015/01/01 ! x + (b) 1 + +>>>=0