mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Tests: Fixed test that will no longer compile
This commit is contained in:
parent
ab40fae67e
commit
3765aacc73
1 changed files with 2 additions and 4 deletions
|
@ -36,7 +36,7 @@ Context context;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (23);
|
UnitTest t (22);
|
||||||
|
|
||||||
// Ensure environment has no influence.
|
// Ensure environment has no influence.
|
||||||
unsetenv ("TASKDATA");
|
unsetenv ("TASKDATA");
|
||||||
|
@ -65,7 +65,6 @@ int main (int argc, char** argv)
|
||||||
// TODO const std::string uuid ();
|
// TODO const std::string uuid ();
|
||||||
|
|
||||||
// TODO These are in feedback.cpp, not util.cpp.
|
// TODO These are in feedback.cpp, not util.cpp.
|
||||||
// std::string taskDiff (const Task&, const Task&);
|
|
||||||
Task left;
|
Task left;
|
||||||
left.set ("zero", "0");
|
left.set ("zero", "0");
|
||||||
left.set ("one", 1);
|
left.set ("one", 1);
|
||||||
|
@ -79,13 +78,12 @@ int main (int argc, char** argv)
|
||||||
Task rightAgain (right);
|
Task rightAgain (right);
|
||||||
|
|
||||||
std::string output = taskDifferences (left, right);
|
std::string output = taskDifferences (left, right);
|
||||||
t.ok (taskDiff (left, right), "Detected changes");
|
t.ok (left != right, "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 ("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 ("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 ("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");
|
t.ok (output.find ("Three will be set to '3'") != std::string::npos, "Detected addition -> three:3");
|
||||||
|
|
||||||
t.notok (taskDiff (right, rightAgain), "No changes detected");
|
|
||||||
output = taskDifferences (right, rightAgain);
|
output = taskDifferences (right, rightAgain);
|
||||||
t.ok (output.find ("No changes will be made") != std::string::npos, "No changes detected");
|
t.ok (output.find ("No changes will be made") != std::string::npos, "No changes detected");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue