Extended xact example used by some pre-commands
This commit is contained in:
parent
39973b1277
commit
6538a2d1b8
1 changed files with 7 additions and 3 deletions
|
|
@ -42,7 +42,7 @@
|
||||||
namespace ledger {
|
namespace ledger {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
post_t * get_sample_post(report_t& report)
|
post_t * get_sample_xact(report_t& report)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
string str;
|
string str;
|
||||||
|
|
@ -50,7 +50,11 @@ namespace {
|
||||||
std::ostringstream buf;
|
std::ostringstream buf;
|
||||||
|
|
||||||
buf << "2004/05/27 Book Store\n"
|
buf << "2004/05/27 Book Store\n"
|
||||||
|
<< " ; This note applies to all postings. :SecondTag:\n"
|
||||||
<< " Expenses:Books 20 BOOK @ $10\n"
|
<< " Expenses:Books 20 BOOK @ $10\n"
|
||||||
|
<< " ; Metadata: Some Value\n"
|
||||||
|
<< " ; :ExampleTag:\n"
|
||||||
|
<< " ; Here follows a note describing the posting.\n"
|
||||||
<< " Liabilities:MasterCard $-200.00\n";
|
<< " Liabilities:MasterCard $-200.00\n";
|
||||||
|
|
||||||
str = buf.str();
|
str = buf.str();
|
||||||
|
|
@ -82,7 +86,7 @@ value_t parse_command(call_scope_t& args)
|
||||||
report_t& report(find_scope<report_t>(args));
|
report_t& report(find_scope<report_t>(args));
|
||||||
std::ostream& out(report.output_stream);
|
std::ostream& out(report.output_stream);
|
||||||
|
|
||||||
post_t * post = get_sample_post(report);
|
post_t * post = get_sample_xact(report);
|
||||||
|
|
||||||
out << _("--- Input expression ---") << std::endl;
|
out << _("--- Input expression ---") << std::endl;
|
||||||
out << arg << std::endl;
|
out << arg << std::endl;
|
||||||
|
|
@ -131,7 +135,7 @@ value_t format_command(call_scope_t& args)
|
||||||
report_t& report(find_scope<report_t>(args));
|
report_t& report(find_scope<report_t>(args));
|
||||||
std::ostream& out(report.output_stream);
|
std::ostream& out(report.output_stream);
|
||||||
|
|
||||||
post_t * post = get_sample_post(report);
|
post_t * post = get_sample_xact(report);
|
||||||
|
|
||||||
out << _("--- Input format string ---") << std::endl;
|
out << _("--- Input format string ---") << std::endl;
|
||||||
out << arg << std::endl << std::endl;
|
out << arg << std::endl << std::endl;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue