mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Test: Merged tw-1527.t into add.t
This commit is contained in:
parent
e857804ccc
commit
58fe2326db
2 changed files with 28 additions and 70 deletions
28
test/add.t
28
test/add.t
|
@ -148,6 +148,34 @@ class TestBug1419(TestCase):
|
|||
self.assertEqual("one -two\n", out)
|
||||
|
||||
|
||||
class TestBug1527(TestCase):
|
||||
def setUp(self):
|
||||
self.t = Task()
|
||||
|
||||
def _validate(self):
|
||||
code, out, err = self.t()
|
||||
|
||||
expected = "First/Second http://taskwarrior.org"
|
||||
self.assertIn(expected, out)
|
||||
|
||||
notexpected = "First / Second http: / / taskwarrior.org"
|
||||
self.assertNotIn(notexpected, out)
|
||||
notexpected = "First / Second http://taskwarrior.org"
|
||||
self.assertNotIn(notexpected, out)
|
||||
notexpected = "First/Second http: / / taskwarrior.org"
|
||||
self.assertNotIn(notexpected, out)
|
||||
|
||||
def test_add_slash_quoted(self):
|
||||
"""1527: Extra spaces added around slashes when quoted"""
|
||||
self.t("add First/Second http://taskwarrior.org")
|
||||
self._validate()
|
||||
|
||||
def test_add_slash_quoted_parser_stop(self):
|
||||
"""1527: Extra spaces added around slashes when quoted after parser stop"""
|
||||
self.t("add -- First/Second http://taskwarrior.org")
|
||||
self._validate()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue