mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Test: Merged bug.879.t into quotes.t
This commit is contained in:
parent
4e178c8186
commit
b5b005d01f
2 changed files with 17 additions and 60 deletions
|
@ -35,7 +35,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
|||
from basetest import Task, TestCase
|
||||
|
||||
|
||||
class TestCLI(TestCase):
|
||||
class TestQuoting(TestCase):
|
||||
def setUp(self):
|
||||
"""Executed before each test in the class"""
|
||||
# Used to initialize objects that should be re-initialized or
|
||||
|
@ -52,6 +52,22 @@ class TestCLI(TestCase):
|
|||
code, out, err = self.t("_get 2.description")
|
||||
self.assertIn("1-2", out)
|
||||
|
||||
class TestBug879(TestCase):
|
||||
def setUp(self):
|
||||
"""Executed before each test in the class"""
|
||||
self.t = Task()
|
||||
|
||||
def test_backslash_at_eol(self):
|
||||
"""879: Backslash at end of description/annotation causes problems"""
|
||||
self.t("add one\\\\\\\\")
|
||||
code, out, err = self.t("_get 1.description")
|
||||
self.assertEqual("one\\\n", out)
|
||||
|
||||
self.t("1 annotate two\\\\\\\\")
|
||||
code, out, err = self.t("long rc.verbose:nothing")
|
||||
self.assertIn("one\\\n", out)
|
||||
self.assertIn("two\\\n", out)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue