From 0cc2de61795816ad1d340f30fe18a996c3e639a3 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Wed, 19 Jan 2022 19:48:12 -0500 Subject: [PATCH] tests: Add a test for handling short UUIDs in the depends column --- test/dependencies.t | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/dependencies.t b/test/dependencies.t index 120fa96f7..171fd1d4b 100755 --- a/test/dependencies.t +++ b/test/dependencies.t @@ -211,6 +211,22 @@ class TestDependencies(TestCase): code, out, err = self.t("3 modify dep:-1,-%s" % uuid) self.assertIn("Modifying task 3 'three'.", out) + def test_id_uuid_short_dep(self): + """Check that short UUIDs are usable for deps""" + + # Get 2.uuid + code, out, err = self.t("_get 2.uuid") + short_uuid = out.strip().split("-")[0] + + # Add a mix of IDs and UUID + code, out, err = self.t("add three dep:%s" % short_uuid) + self.assertIn("Created task 3.", out) + + # Remove a mix of IЅs and UUID + code, out, err = self.t("3 modify dep:-%s" % short_uuid) + self.assertIn("Modifying task 3 'three'.", out) + + class TestBug697(TestCase): def setUp(self): """Executed before each test in the class"""