File tree Expand file tree Collapse file tree 2 files changed +84
-0
lines changed
packages/compiler-core/__tests__ Expand file tree Collapse file tree 2 files changed +84
-0
lines changed Original file line number Diff line number Diff line change @@ -2444,6 +2444,81 @@ exports[`compiler: parse > Errors > MISSING_END_TAG_NAME > <template></></templa
24442444}
24452445`;
24462446
2447+ exports[`compiler: parse > Errors > UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME > <template ><div " ></div></template> 1`] = `
2448+ {
2449+ " cached": [],
2450+ " children" : [
2451+ {
2452+ " children" : [
2453+ {
2454+ " children" : [],
2455+ " codegenNode" : undefined ,
2456+ " loc" : {
2457+ " end" : {
2458+ " column" : 24 ,
2459+ " line" : 1 ,
2460+ " offset" : 23 ,
2461+ },
2462+ " source" : " <div " >< / div > " ,
2463+ " start" : {
2464+ " column" : 11 ,
2465+ " line" : 1 ,
2466+ " offset" : 10 ,
2467+ },
2468+ },
2469+ " ns" : 0 ,
2470+ " props" : [],
2471+ " tag" : " div" ,
2472+ " tagType" : 0 ,
2473+ " type" : 1 ,
2474+ },
2475+ ],
2476+ " codegenNode" : undefined ,
2477+ " loc" : {
2478+ " end" : {
2479+ " column" : 35 ,
2480+ " line" : 1 ,
2481+ " offset" : 34 ,
2482+ },
2483+ " source" : " <template><div " >< / div >< / template > " ,
2484+ " start" : {
2485+ " column" : 1 ,
2486+ " line" : 1 ,
2487+ " offset" : 0 ,
2488+ },
2489+ },
2490+ " ns" : 0 ,
2491+ " props" : [],
2492+ " tag" : " template" ,
2493+ " tagType" : 0 ,
2494+ " type" : 1 ,
2495+ } ,
2496+ ],
2497+ " codegenNode" : undefined,
2498+ " components" : [],
2499+ " directives" : [],
2500+ " helpers" : Set { } ,
2501+ " hoists" : [],
2502+ " imports" : [],
2503+ " loc" : {
2504+ " end" : {
2505+ " column" : 35 ,
2506+ " line" : 1 ,
2507+ " offset" : 34 ,
2508+ },
2509+ " source" : " <template><div " >< / div >< / template > " ,
2510+ " start" : {
2511+ " column" : 1 ,
2512+ " line" : 1 ,
2513+ " offset" : 0 ,
2514+ },
2515+ } ,
2516+ " source" : " <template><div " ></div ></template >",
2517+ "temps": 0,
2518+ "type": 0,
2519+ }
2520+ `;
2521+
24472522exports[`compiler: parse > Errors > UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME > <template ><div a"bc=''></div></template> 1`] = `
24482523{
24492524 " cached" : [],
Original file line number Diff line number Diff line change @@ -3210,6 +3210,15 @@ describe('compiler: parse', () => {
32103210 } ,
32113211 ] ,
32123212 } ,
3213+ {
3214+ code : '<template><div "></div></template>' ,
3215+ errors : [
3216+ {
3217+ type : ErrorCodes . UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME ,
3218+ loc : { offset : 15 , line : 1 , column : 16 } ,
3219+ } ,
3220+ ] ,
3221+ } ,
32133222 ] ,
32143223 UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE : [
32153224 {
You can’t perform that action at this time.
0 commit comments