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