2007/02/02 * Foo
    Expenses:Food                         $10.00
    Assets:Cash

2007/02/03 Bar
    * Expenses:Food                       $20.00
    Assets:Cash

2007/02/02 Baz
    Expenses:Foodx                        $30.00
    Assets:Cash

$ hledger -f- check

#test reg --strict
#07-Feb-02 Foo                   Expenses:Food                $10.00       $10.00
#                                Assets:Cash                 $-10.00            0
#07-Feb-03 Bar                   Expenses:Food                $20.00       $20.00
#                                Assets:Cash                 $-20.00            0
#07-Feb-02 Baz                   Expenses:Foodx               $30.00       $30.00
#                                Assets:Cash                 $-30.00            0
#__ERROR__
#Warning: "$FILE", line 2: Unknown account 'Expenses:Food'
#Warning: "$FILE", line 2: Unknown commodity '$'
#Warning: "$FILE", line 3: Unknown account 'Assets:Cash'
#Warning: "$FILE", line 6: Unknown account 'Expenses:Food'
#Warning: "$FILE", line 6: Unknown commodity '$'
#Warning: "$FILE", line 7: Unknown account 'Assets:Cash'
#Warning: "$FILE", line 10: Unknown account 'Expenses:Foodx'
#Warning: "$FILE", line 10: Unknown commodity '$'
#Warning: "$FILE", line 11: Unknown account 'Assets:Cash'
#end test
#