コード例 #1
0
ファイル: test_util.py プロジェクト: APSL/django-braces
 def test_doctype_matches(self):
     self.assert_(util.doctype_matches('<!DOCTYPE html PUBLIC "a"> <html>',
                                       'html.*'))
     self.failIf(util.doctype_matches('<?xml ?> <DOCTYPE html PUBLIC "a"> <html>',
                                      'html.*'))
     self.assert_(util.html_doctype_matches(
         '<?xml ?><!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN">'))
コード例 #2
0
 def test_doctype_matches(self):
     self.assertTrue(util.doctype_matches(
         '<!DOCTYPE html PUBLIC "a"> <html>', 'html.*'))
     self.assertFalse(util.doctype_matches(
         '<?xml ?> <DOCTYPE html PUBLIC "a"> <html>', 'html.*'))
     self.assertTrue(util.html_doctype_matches(
         '<?xml ?><!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN">'))
コード例 #3
0
def test_doctype_matches():
    assert util.doctype_matches('<!DOCTYPE html> <html>', 'html.*')
    assert not util.doctype_matches(
        '<?xml ?> <DOCTYPE html PUBLIC "a"> <html>', 'html.*')
    assert util.html_doctype_matches(
        '<?xml ?><!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN">')
コード例 #4
0
ファイル: test_util.py プロジェクト: chensunn/PortableJekyll
 def test_doctype_matches(self):
     self.assertTrue(util.doctype_matches('<!DOCTYPE html PUBLIC "a"> <html>', "html.*"))
     self.assertFalse(util.doctype_matches('<?xml ?> <DOCTYPE html PUBLIC "a"> <html>', "html.*"))
     self.assertTrue(util.html_doctype_matches('<?xml ?><!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN">'))