mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
remove TBD2::clear, only used in tests
This commit is contained in:
parent
271d06cd9c
commit
e3ef6c504a
3 changed files with 12 additions and 20 deletions
|
@ -33,6 +33,16 @@
|
|||
|
||||
Context context;
|
||||
|
||||
void cleardb ()
|
||||
{
|
||||
// Remove any residual test files.
|
||||
rmdir ("./extensions");
|
||||
unlink ("./pending.data");
|
||||
unlink ("./completed.data");
|
||||
unlink ("./undo.data");
|
||||
unlink ("./backlog.data");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int, char**)
|
||||
{
|
||||
|
@ -44,12 +54,7 @@ int main (int, char**)
|
|||
|
||||
try
|
||||
{
|
||||
// Remove any residual test files.
|
||||
rmdir ("./extensions");
|
||||
unlink ("./pending.data");
|
||||
unlink ("./completed.data");
|
||||
unlink ("./undo.data");
|
||||
unlink ("./backlog.data");
|
||||
cleardb ();
|
||||
|
||||
// Set the context to allow GC.
|
||||
context.config.set ("gc", 1);
|
||||
|
@ -98,7 +103,7 @@ int main (int, char**)
|
|||
context.tdb2.commit ();
|
||||
|
||||
// Reset for reuse.
|
||||
context.tdb2.clear ();
|
||||
cleardb ();
|
||||
context.tdb2.set_location (".");
|
||||
|
||||
// TODO commit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue