add test prevent false positive

pull/4136/head
Tan Li Hau 6 years ago
parent 35ea2468de
commit 4e3f840c79

@ -0,0 +1,19 @@
{#if true}
<input >
{:else}
{/if}
{#if true}
<br >
{:else}
{/if}
{#await true}
<input >
{:then f}
{/await}
{#await true}
<br >
{:then f}
{/await}

@ -0,0 +1,218 @@
{
"html": {
"start": 0,
"end": 148,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 33,
"type": "IfBlock",
"expression": {
"type": "Literal",
"start": 5,
"end": 9,
"value": true,
"raw": "true"
},
"children": [
{
"start": 11,
"end": 19,
"type": "Element",
"name": "input",
"attributes": [],
"children": []
}
],
"else": {
"start": 27,
"end": 28,
"type": "ElseBlock",
"children": []
}
},
{
"start": 33,
"end": 35,
"type": "Text",
"raw": "\n\n",
"data": "\n\n"
},
{
"start": 35,
"end": 65,
"type": "IfBlock",
"expression": {
"type": "Literal",
"start": 40,
"end": 44,
"value": true,
"raw": "true"
},
"children": [
{
"start": 46,
"end": 51,
"type": "Element",
"name": "br",
"attributes": [],
"children": []
}
],
"else": {
"start": 59,
"end": 60,
"type": "ElseBlock",
"children": []
}
},
{
"start": 65,
"end": 67,
"type": "Text",
"raw": "\n\n",
"data": "\n\n"
},
{
"start": 67,
"end": 108,
"type": "AwaitBlock",
"expression": {
"type": "Literal",
"start": 75,
"end": 79,
"value": true,
"raw": "true"
},
"value": "f",
"error": null,
"pending": {
"start": 80,
"end": 90,
"type": "PendingBlock",
"children": [
{
"start": 80,
"end": 81,
"type": "Text",
"raw": "\n",
"data": "\n"
},
{
"start": 81,
"end": 89,
"type": "Element",
"name": "input",
"attributes": [],
"children": []
},
{
"start": 89,
"end": 90,
"type": "Text",
"raw": "\n",
"data": "\n"
}
],
"skip": false
},
"then": {
"start": 90,
"end": 100,
"type": "ThenBlock",
"children": [
{
"start": 99,
"end": 100,
"type": "Text",
"raw": "\n",
"data": "\n"
}
],
"skip": false
},
"catch": {
"start": null,
"end": null,
"type": "CatchBlock",
"children": [],
"skip": true
}
},
{
"start": 108,
"end": 110,
"type": "Text",
"raw": "\n\n",
"data": "\n\n"
},
{
"start": 110,
"end": 148,
"type": "AwaitBlock",
"expression": {
"type": "Literal",
"start": 118,
"end": 122,
"value": true,
"raw": "true"
},
"value": "f",
"error": null,
"pending": {
"start": 123,
"end": 130,
"type": "PendingBlock",
"children": [
{
"start": 123,
"end": 124,
"type": "Text",
"raw": "\n",
"data": "\n"
},
{
"start": 124,
"end": 129,
"type": "Element",
"name": "br",
"attributes": [],
"children": []
},
{
"start": 129,
"end": 130,
"type": "Text",
"raw": "\n",
"data": "\n"
}
],
"skip": false
},
"then": {
"start": 130,
"end": 140,
"type": "ThenBlock",
"children": [
{
"start": 139,
"end": 140,
"type": "Text",
"raw": "\n",
"data": "\n"
}
],
"skip": false
},
"catch": {
"start": null,
"end": null,
"type": "CatchBlock",
"children": [],
"skip": true
}
}
]
}
}
Loading…
Cancel
Save