; Test for: Using ! erroneously in a data file causes a segfault

! Assets:Cash

2008/01/01 January
    Expenses:Books          $10.00
    Assets:Cash

!end

$ hledger -f- check

#test bal -> 1
#__ERROR__
#While parsing file "$FILE", line 9:
#Error: 'end' or 'end apply' found, but no enclosing 'apply' directive
#end test
#
#