From 06c890c33659656da2e14f9876d79599cccbdbed Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 19 Sep 2019 13:40:08 -0400 Subject: [PATCH] test: update snapshots --- .../__snapshots__/parse.spec.ts.snap | 7524 +++++++++++++++++ 1 file changed, 7524 insertions(+) diff --git a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap index f9e949bc6..ebee2f72f 100644 --- a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap @@ -7523,3 +7523,7527 @@ Object { "type": 0, } `; + +exports[`compiler: parse Errors ABRUPT_CLOSING_OF_EMPTY_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABRUPT_CLOSING_OF_EMPTY_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABRUPT_CLOSING_OF_EMPTY_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "attr=\\"c\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "c", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "\\"c\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + "source": "attr=\\"&#a;\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "&#a;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + "source": "\\"&#a;\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "attr=\\"ÿ\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "ÿ", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "\\"ÿ\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + "offset": 35, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + "offset": 35, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "attr=\\"&#xg;\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "&#xg;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "\\"&#xg;\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "c", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "c", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "&#a;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "source": "&#a;", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "ÿ", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "source": "ÿ", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "&#xg;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "&#xg;", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "[CDATA[cdata]]", + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "cdata", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "cdata", + "start": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "cdata", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 1, + "tag": "svg", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + "offset": 49, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + "offset": 49, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "�", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "�", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + "offset": 31, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + "offset": 31, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors DUPLICATE_ATTRIBUTE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "id=\\"\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "type": 5, + "value": Object { + "content": "", + "isEmpty": true, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "\\"\\"", + "start": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 2, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "id=\\"\\"", + "start": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + }, + "name": "id", + "type": 5, + "value": Object { + "content": "", + "isEmpty": true, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "\\"\\"", + "start": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "
", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + "offset": 44, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + "offset": 44, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors END_TAG_WITH_ATTRIBUTES 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "
", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors END_TAG_WITH_TRAILING_SOLIDUS 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "
", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME