def test_not_allowed_multiline(self) -> None: val = "note { 'line1\nline2\nline3' }" with self.assertRaises(ParseSyntaxException): note_object.parseString(val, parseAll=True)
def test_unclosed_quote(self) -> None: val = 'note{ "test note}' with self.assertRaises(ParseSyntaxException): note_object.parseString(val, parseAll=True)
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')
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')
def test_single_quote(self) -> None: val = "note {'test note'}" res = note_object.parseString(val, parseAll=True) self.assertEqual(res[0].text, 'test note')