Unit Tests

- Implemented YAML import/export roundtrip tests.
- Corrected export.yaml.t regarding headers.
- Modified export.yaml, export.csv and export.ical to clear any
  context.headers messages so they don't interfere with the output.
This commit is contained in:
Paul Beckingham
2010-08-07 22:38:03 -04:00
parent 3ae5b6ddc5
commit 0fe75eeedf
3 changed files with 108 additions and 18 deletions

View File

@@ -80,6 +80,9 @@ int handleExportCSV (std::string &outs)
outs = out.str ();
context.hooks.trigger ("post-export-command");
// Prevent messages from cluttering the export output.
context.headers.clear ();
}
return rc;
@@ -214,6 +217,9 @@ int handleExportiCal (std::string &outs)
outs = out.str ();
context.hooks.trigger ("post-export-command");
// Prevent messages from cluttering the export output.
context.headers.clear ();
}
return rc;
@@ -249,6 +255,9 @@ int handleExportYAML (std::string &outs)
outs = out.str ();
context.hooks.trigger ("post-export-command");
// Prevent messages from cluttering the export output.
context.headers.clear ();
}
return rc;