diff --git a/test/review-planner-misreads.test.ts b/test/review-planner-misreads.test.ts index 40be1d1ae..42059f822 100644 --- a/test/review-planner-misreads.test.ts +++ b/test/review-planner-misreads.test.ts @@ -159,11 +159,19 @@ describe('GST-911 misread 1: a chart SVG is data, an SVG that can run code is se ['a character-reference comment in a style element', ' '], ['CSS after an HTML empty comment in a style element', ' '], ['CSS after an HTML --!> comment end in a style element', ' '], + ['a inside a quoted style attribute', ' '], + ['an escaped ampersand in a style element', ' '], ])('%s keeps the SVG code', (_name, line) => { const fx = fixture(); expect(plan(fx, fx.commit({ 'results/chart.svg': chart(5, line) })).class).toBe('code'); }, 60_000); + // Value: protects=the GST-940 style walker still reads a plain chart style as a drawing: a comment, CDATA and a quoted attribute + // without markup; fails_when=the walker over-refuses them, so chart SVGs lose the light review; seam=svgDrawing + test('a style comment, CDATA and quoted attribute keep a chart a drawing (GST-940)', () => { + expect(svgDrawing(chart(5, ' '))).toBe(true); + }); + // Value: protects=a passive edit to an SVG that already carries a script is still code, because the whole file decides, not the // changed lines; and an SVG code names stays code like any consumed data file; fails_when=either plans as docs; seam=collectCommit test('an edit inside a scripted SVG, and an SVG code names, stay code', () => {