def test_not_allowed_multiline(self) -> None: val = "note: 'line1\nline2\nline3'" with self.assertRaises(ParseSyntaxException): note.parseString(val, parseAll=True)
def test_unclosed_quote(self) -> None: val = 'note: "test note' with self.assertRaises(ParseSyntaxException): note.parseString(val, parseAll=True)
def test_double_quote(self) -> None: val = 'note: \n "test note"' res = note.parseString(val, parseAll=True) self.assertEqual(res[0].text, 'test note')
def test_multiline(self) -> None: val = "note: '''line1\nline2\nline3'''" res = note.parseString(val, parseAll=True) self.assertEqual(res[0].text, 'line1\nline2\nline3')
def test_single_quote(self) -> None: val = "note: 'test note'" res = note.parseString(val, parseAll=True) self.assertEqual(res[0].text, 'test note')