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