Tests: Convert bug.485.t

This commit is contained in:
Renato Alves 2015-07-03 19:38:57 +01:00
parent e88f4cf776
commit b824f3323f
2 changed files with 15 additions and 57 deletions

View file

@ -128,6 +128,21 @@ class TestAnnotate(TestCase):
msg="dateformat - first annotation task 3")
class TestBug495(TestCase):
def setUp(self):
self.t = Task()
def test_double_hyphen_annotation(self):
"""double hyphen mishandled for annotations"""
# NOTE: originally Bug #495
self.t(("add", "foo"))
self.t(("1", "annotate", "This -- is -- a -- test"))
code, out, err = self.t(("long",))
# Double hyphens preserved except the first ones
self.assertIn("This is -- a -- test", out)
if __name__ == "__main__":
from simpletap import TAPTestRunner
unittest.main(testRunner=TAPTestRunner())