コード例 #1
0
 def test_jshint_errors_should_return_true_xml_output(self):
     output = '<?xml version="1.0" encoding="utf-8"?><lint>\n<file name='\
         '"incorrect.css"><issue line="2" char="1" severity="error" '\
         'reason="Unexpected token \'{\' at line 2, col 1." evidence='\
         '"{}"/><issue line="2" char="2" severity="error" '\
         'reason="Unexpected token \'}\' at line 2, col 2." evidence='\
         '"{}"/></file>\n</lint>\n'
     self.assertTrue(csslint_errors(output, True))
コード例 #2
0
 def test_jshint_errors_should_return_false_normal_output(self):
     output = ''
     self.assertFalse(csslint_errors(output, False))
コード例 #3
0
 def test_jshint_errors_should_return_true_normal_output(self):
     output = 'incorrect.css: line 2, col 1, Error - Unexpected token '\
         '\'{\' at line 2, col 1.\nincorrect.css: line 2, col 2, Error'\
         ' - Unexpected token \'}\' at line 2, col 2.\n\n'
     self.assertTrue(csslint_errors(output, False))
コード例 #4
0
 def test_jshint_errors_should_return_false_xml_output(self):
     output = '<?xml version="1.0" encoding="utf-8"?><lint>\n</lint>\n'
     self.assertFalse(csslint_errors(output, True))