mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Refactor task diffs to handle new attributes
This refactors task(Info)Differences to be methods of Task and to correctly handle the `annotation_`, `tags_`, and `dep_` attributes.
This commit is contained in:
parent
7aee9567a3
commit
309e99d49e
14 changed files with 269 additions and 223 deletions
|
@ -57,14 +57,14 @@ int main (int, char**)
|
|||
|
||||
Task rightAgain (right);
|
||||
|
||||
std::string output = taskDifferences (left, right);
|
||||
std::string output = left.diff (right);
|
||||
t.ok (left.data != right.data, "Detected changes");
|
||||
t.ok (output.find ("Zero will be changed from '0' to '00'") != std::string::npos, "Detected change zero:0 -> zero:00");
|
||||
t.ok (output.find ("One will be deleted") != std::string::npos, "Detected deletion one:1 ->");
|
||||
t.ok (output.find ("Two") == std::string::npos, "Detected no change two:2 -> two:2");
|
||||
t.ok (output.find ("Three will be set to '3'") != std::string::npos, "Detected addition -> three:3");
|
||||
|
||||
output = taskDifferences (right, rightAgain);
|
||||
output = right.diff (rightAgain);
|
||||
t.ok (output.find ("No changes will be made") != std::string::npos, "No changes detected");
|
||||
|
||||
// std::vector<std::string> indentProject (const std::string&, const std::string whitespace=" ", char delimiter='.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue