From: Evan You Date: Wed, 22 Nov 2023 05:58:50 +0000 (+0800) Subject: wip: parse error tests X-Git-Tag: v3.4.0-alpha.2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59227d4124ad9ba34d069048f667262ce50f0d1b;p=thirdparty%2Fvuejs%2Fcore.git wip: parse error tests --- diff --git a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap index 8493e6232f..b3a3d6b93b 100644 --- a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap @@ -1,5 +1,4138 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`compiler: parse > Errors > CDATA_IN_HTML_CONTENT > 1`] = ` +{ + "cached": 0, + "children": [ + { + "children": [], + "codegenNode": undefined, + "loc": { + "end": { + "column": 39, + "line": 1, + "offset": 38, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "props": [], + "tag": "template", + "tagType": 0, + "type": 1, + }, + ], + "codegenNode": undefined, + "components": [], + "directives": [], + "helpers": Set {}, + "hoists": [], + "imports": [], + "loc": { + "end": { + "column": 39, + "line": 1, + "offset": 38, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "source": "", + "temps": 0, + "type": 0, +} +`; + +exports[`compiler: parse > Errors > CDATA_IN_HTML_CONTENT > 1`] = ` +{ + "cached": 0, + "children": [ + { + "children": [ + { + "children": [ + { + "content": "cdata", + "loc": { + "end": { + "column": 30, + "line": 1, + "offset": 29, + }, + "start": { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 2, + }, + ], + "codegenNode": undefined, + "loc": { + "end": { + "column": 39, + "line": 1, + "offset": 38, + }, + "start": { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 1, + "props": [], + "tag": "svg", + "tagType": 0, + "type": 1, + }, + ], + "codegenNode": undefined, + "loc": { + "end": { + "column": 50, + "line": 1, + "offset": 49, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "props": [], + "tag": "template", + "tagType": 0, + "type": 1, + }, + ], + "codegenNode": undefined, + "components": [], + "directives": [], + "helpers": Set {}, + "hoists": [], + "imports": [], + "loc": { + "end": { + "column": 50, + "line": 1, + "offset": 49, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "source": "", + "temps": 0, + "type": 0, +} +`; + +exports[`compiler: parse > Errors > DUPLICATE_ATTRIBUTE > 1`] = ` +{ + "cached": 0, + "children": [ + { + "children": [ + { + "children": [], + "codegenNode": undefined, + "loc": { + "end": { + "column": 34, + "line": 1, + "offset": 33, + }, + "start": { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "props": [ + { + "loc": { + "end": { + "column": 21, + "line": 1, + "offset": 20, + }, + "start": { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "nameLoc": { + "end": { + "column": 18, + "line": 1, + "offset": 17, + }, + "start": { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 6, + "value": { + "content": "", + "loc": { + "end": { + "column": 21, + "line": 1, + "offset": 20, + }, + "start": { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 2, + }, + }, + { + "loc": { + "end": { + "column": 27, + "line": 1, + "offset": 26, + }, + "start": { + "column": 22, + "line": 1, + "offset": 21, + }, + }, + "name": "id", + "nameLoc": { + "end": { + "column": 24, + "line": 1, + "offset": 23, + }, + "start": { + "column": 22, + "line": 1, + "offset": 21, + }, + }, + "type": 6, + "value": { + "content": "", + "loc": { + "end": { + "column": 27, + "line": 1, + "offset": 26, + }, + "start": { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 2, + }, + }, + ], + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "codegenNode": undefined, + "loc": { + "end": { + "column": 45, + "line": 1, + "offset": 44, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "props": [], + "tag": "template", + "tagType": 0, + "type": 1, + }, + ], + "codegenNode": undefined, + "components": [], + "directives": [], + "helpers": Set {}, + "hoists": [], + "imports": [], + "loc": { + "end": { + "column": 45, + "line": 1, + "offset": 44, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "source": "", + "temps": 0, + "type": 0, +} +`; + +exports[`compiler: parse > Errors > EOF_BEFORE_TAG_NAME >