Exemplo n.º 1
0
 def test_no_semicolon(self):
     src = u'@charset "utf-8"  '
     parser = Parser(src)
     self.assertTrue(parser.match(tokens.START))
     with self.assertRaises(errors.CSSSyntaxError):
         parser.charset()
     
     src = u'@charset "utf-8"'
     parser = Parser(src)
     self.assertTrue(parser.match(tokens.START))
     with self.assertRaises(errors.CSSSyntaxError):
         parser.charset()
Exemplo n.º 2
0
 def test_no_string(self):
     src = u'@charset  ;'
     parser = Parser(src)
     self.assertTrue(parser.match(tokens.START))
     with self.assertRaises(errors.CSSSyntaxError):
         parser.charset()