mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
DOM: tw.syncneeded should be 0/1, not false/true
This commit is contained in:
parent
146a72b331
commit
60e5c488ac
2 changed files with 6 additions and 6 deletions
|
@ -91,12 +91,12 @@ bool getDOM (const std::string& name, Variant& value)
|
|||
{
|
||||
if (name == "tw.syncneeded")
|
||||
{
|
||||
value = Variant (false);
|
||||
value = Variant (0);
|
||||
for (const auto& line : context.tdb2.backlog.get_lines ())
|
||||
{
|
||||
if (line[0] == '{')
|
||||
{
|
||||
value = Variant (true);
|
||||
value = Variant (1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,16 +286,16 @@ class TestDOMSync(TestCase):
|
|||
""" DOM tw.syncneeded --> false """
|
||||
code, out, err = self.t("_get tw.syncneeded")
|
||||
self.assertEqual(code, 0)
|
||||
self.assertIn("false", out)
|
||||
self.assertNotIn("true", out)
|
||||
self.assertIn("0", out)
|
||||
self.assertNotIn("1k", out)
|
||||
|
||||
def test_dom_tw_syncneeded_true(self):
|
||||
""" DOM tw.syncneeded --> true """
|
||||
self.t("add foo")
|
||||
code, out, err = self.t("_get tw.syncneeded")
|
||||
self.assertEqual(code, 0)
|
||||
self.assertNotIn("false", out)
|
||||
self.assertIn("true", out)
|
||||
self.assertNotIn("0", out)
|
||||
self.assertIn("1", out)
|
||||
|
||||
|
||||
class TestDOMDirectReferencesOnAddition(TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue