|
27 | 27 | }, |
28 | 28 |
|
29 | 29 | "Formatter should escape special characters": function() { |
30 | | - var specialCharsSting = 'sneaky, "sneaky", <sneaky>', |
| 30 | + var specialCharsSting = 'sneaky, "sneaky", <sneaky>, sneak & sneaky', |
31 | 31 | result = { messages: [ |
32 | 32 | { type: "warning", line: 1, col: 1, message: specialCharsSting, evidence: "ALSO BOGUS", rule: [] }, |
33 | 33 | { type: "error", line: 2, col: 1, message: specialCharsSting, evidence: "ALSO BOGUS", rule: [] } |
34 | 34 | ], stats: [] }, |
35 | 35 | file = "<file name=\"FILE\">", |
36 | | - error1 = "<error line=\"1\" column=\"1\" severity=\"warning\" message=\"sneaky, 'sneaky', <sneaky>\" source=\"\"/>", |
37 | | - error2 = "<error line=\"2\" column=\"1\" severity=\"error\" message=\"sneaky, 'sneaky', <sneaky>\" source=\"\"/>", |
| 36 | + error1 = "<error line=\"1\" column=\"1\" severity=\"warning\" message=\"sneaky, 'sneaky', <sneaky>, sneak & sneaky\" source=\"\"/>", |
| 37 | + error2 = "<error line=\"2\" column=\"1\" severity=\"error\" message=\"sneaky, 'sneaky', <sneaky>, sneak & sneaky\" source=\"\"/>", |
38 | 38 | expected = "<?xml version=\"1.0\" encoding=\"utf-8\"?><checkstyle>" + file + error1 + error2 + "</file></checkstyle>", |
39 | 39 | actual = CSSLint.format(result, "FILE", "checkstyle-xml"); |
40 | 40 | Assert.areEqual(expected, actual); |
|
0 commit comments