Add tests to show entity escaping failures
This commit is contained in:
13
tests.py
13
tests.py
@@ -42,6 +42,19 @@ class EscapeTests(unittest.TestCase):
|
||||
def test_underscore(self):
|
||||
self.assertEqual(md('_hey_dude_'), '\_hey\_dude\_')
|
||||
|
||||
def test_xml_entities(self):
|
||||
self.assertEqual(md('&'), '&')
|
||||
|
||||
def test_named_entities(self):
|
||||
self.assertEqual(md('»'), u'\xbb')
|
||||
|
||||
def test_hexadecimal_entities(self):
|
||||
# This looks to be a bug in BeautifulSoup (fixed in bs4) that we have to work around.
|
||||
self.assertEqual(md('''), '\x27')
|
||||
|
||||
def test_single_escaping_entities(self):
|
||||
self.assertEqual(md('&'), '&')
|
||||
|
||||
|
||||
class ConversionTests(unittest.TestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user