From 95643affad66cb6b74771263674f9b9834e33d71 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 15 Jan 2019 12:58:28 -0800 Subject: [PATCH] test that order of include files is maintained (#949) --- tests/journal/include.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/journal/include.test b/tests/journal/include.test index bb4b13840..b614e9862 100644 --- a/tests/journal/include.test +++ b/tests/journal/include.test @@ -71,3 +71,19 @@ include ~/included.journal >>>2 >>>=0 + +# 7. test that order of include files is maintained + printf 'include _b\n' >_a; touch _b; hledger -f _a stats | grep _ | sed -e 's%.*/%%'; rm -rf _a _b +>>> +_a +_b +>>>2 +>>>=0 + +# 8. and with --auto code path + printf 'include _b\n=\n' >_a; touch _b; hledger -f _a stats --auto | grep _ | sed -e 's%.*/%%'; rm -rf _a _b +>>> +_a +_b +>>>2 +>>>=0