mirror of
https://github.com/simonmichael/hledger.git
synced 2024-10-06 10:57:30 +03:00
cln: Replace all uses of deprecated !include with include.
Also include a test which makes sure !include is still parsed.
This commit is contained in:
parent
d45311826b
commit
94d9c28a63
@ -1,8 +1,8 @@
|
||||
; all years
|
||||
|
||||
!include 2006.journal
|
||||
!include 2007.journal
|
||||
!include 2008.journal
|
||||
!include 2009.journal
|
||||
!include 2010.journal
|
||||
!include 2011.journal
|
||||
include 2006.journal
|
||||
include 2007.journal
|
||||
include 2008.journal
|
||||
include 2009.journal
|
||||
include 2010.journal
|
||||
include 2011.journal
|
||||
|
@ -1,4 +1,4 @@
|
||||
; current/recent years
|
||||
|
||||
;!include 2010.journal
|
||||
!include 2011.journal
|
||||
;include 2010.journal
|
||||
include 2011.journal
|
||||
|
@ -492,7 +492,7 @@ defaultyear_journal_txt = T.unlines
|
||||
-- ]
|
||||
|
||||
-- journal4_str = unlines
|
||||
-- ["!include \"somefile\""
|
||||
-- ["include \"somefile\""
|
||||
-- ,"2007/01/27 * joes diner"
|
||||
-- ," expenses:food:dining $10.00"
|
||||
-- ," assets:checking $-47.18"
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 1. nested includes in subdirectories
|
||||
mkdir -p b/c/d ; printf '2010/1/1\n (D) 1\n' >b/c/d/d.journal ; printf '2010/1/1\n (C) 1\n!include d/d.journal\n' >b/c/c.journal ; printf '2010/1/1\n (B) 1\n!include c/c.journal\n' >b/b.journal ; printf '2010/1/1\n (A) 1\n!include b/b.journal\n' >a.journal ; hledger -f a.journal print; rm -rf a.journal b
|
||||
mkdir -p b/c/d ; printf '2010/1/1\n (D) 1\n' >b/c/d/d.journal ; printf '2010/1/1\n (C) 1\ninclude d/d.journal\n' >b/c/c.journal ; printf '2010/1/1\n (B) 1\ninclude c/c.journal\n' >b/b.journal ; printf '2010/1/1\n (A) 1\ninclude b/b.journal\n' >a.journal ; hledger -f a.journal print; rm -rf a.journal bG
|
||||
>>>
|
||||
2010-01-01
|
||||
(A) 1
|
||||
@ -90,3 +90,13 @@ _c
|
||||
_d
|
||||
>>>2
|
||||
>>>=0
|
||||
|
||||
# 9. include using old !include directive
|
||||
printf '2018/01/01\n (A) 1\n' >f.journal; hledger -f - print; rm -f f.journal
|
||||
<<<
|
||||
!include f.journal
|
||||
>>>
|
||||
2018-01-01
|
||||
(A) 1
|
||||
|
||||
>>>=0
|
||||
|
Loading…
Reference in New Issue
Block a user