1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00
semantic/test/corpus/json/javascript/template-string.json
2016-11-03 15:41:59 -07:00

1397 lines
48 KiB
JSON

[{
"testCaseDescription": "javascript-template-string-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
10
]
}
],
"range": [
0,
11
]
}
],
"patch": "insert",
"range": [
0,
11
]
}
],
"hasChanges": true,
"range": [
0,
11
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
11,
11
]
}
],
"hasChanges": true,
"range": [
11,
11
],
"number": 2
}
]
],
"paths": [
"template-string.js",
"template-string.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"01f859b129cb3334140bbe449811e86cc75c9df9"
]
},
"filePaths": [
"template-string.js"
],
"patch": [
"diff --git a/template-string.js b/template-string.js",
"index e69de29..01f859b 100644",
"--- a/template-string.js",
"+++ b/template-string.js",
"@@ -0,0 +1 @@",
"+`one line`"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "c32361c31b256ea32638cead8a9639d9d3bb55d4..eadba66cb97d885739f3686453ed93fc62b92191"
}
,{
"testCaseDescription": "javascript-template-string-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
12
]
}
],
"patch": "insert",
"range": [
0,
13
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
13,
23
]
}
],
"patch": "insert",
"range": [
13,
24
]
}
],
"range": [
13,
24
]
}
],
"hasChanges": true,
"range": [
13,
24
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
10
]
}
],
"range": [
0,
11
]
}
],
"range": [
0,
11
]
}
],
"hasChanges": false,
"range": [
0,
11
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
24,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
24,
35
]
}
],
"hasChanges": false,
"range": [
24,
35
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
11,
11
]
}
],
"hasChanges": false,
"range": [
11,
11
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
35,
35
]
}
],
"hasChanges": false,
"range": [
35,
35
],
"number": 4
}
]
],
"paths": [
"template-string.js",
"template-string.js"
],
"oids": [
"01f859b129cb3334140bbe449811e86cc75c9df9",
"777fde681ebad68c77e45fd68ee8389038736407"
]
},
"filePaths": [
"template-string.js"
],
"patch": [
"diff --git a/template-string.js b/template-string.js",
"index 01f859b..777fde6 100644",
"--- a/template-string.js",
"+++ b/template-string.js",
"@@ -1 +1,3 @@",
"+`multi line`",
"+`one line`",
" `one line`"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "eadba66cb97d885739f3686453ed93fc62b92191..ca0bde0a439c7163f90ffc1bab26d92e478ff307"
}
,{
"testCaseDescription": "javascript-template-string-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"patch": "replace",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"patch": "replace",
"range": [
0,
10
]
}
],
"range": [
0,
11
]
}
],
"range": [
0,
11
]
}
],
"hasChanges": true,
"range": [
0,
11
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
13,
23
]
}
],
"range": [
13,
24
]
}
],
"range": [
13,
24
]
}
],
"hasChanges": false,
"range": [
13,
24
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
11,
21
]
}
],
"range": [
11,
22
]
}
],
"range": [
11,
22
]
}
],
"hasChanges": false,
"range": [
11,
22
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
24,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
24,
35
]
}
],
"hasChanges": false,
"range": [
24,
35
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
22,
32
]
}
],
"range": [
22,
33
]
}
],
"range": [
22,
33
]
}
],
"hasChanges": false,
"range": [
22,
33
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
35,
35
]
}
],
"hasChanges": false,
"range": [
35,
35
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
33,
33
]
}
],
"hasChanges": false,
"range": [
33,
33
],
"number": 4
}
]
],
"paths": [
"template-string.js",
"template-string.js"
],
"oids": [
"777fde681ebad68c77e45fd68ee8389038736407",
"657129fcb82d906b47bd27ec31a64fbf62bcea24"
]
},
"filePaths": [
"template-string.js"
],
"patch": [
"diff --git a/template-string.js b/template-string.js",
"index 777fde6..657129f 100644",
"--- a/template-string.js",
"+++ b/template-string.js",
"@@ -1,3 +1,3 @@",
"-`multi line`",
"+`one line`",
" `one line`",
" `one line`"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "ca0bde0a439c7163f90ffc1bab26d92e478ff307..a3a14c9ce30d30111bd78c7b386af50661fca52b"
}
,{
"testCaseDescription": "javascript-template-string-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"patch": "replace",
"range": [
0,
10
]
}
],
"range": [
0,
11
]
}
],
"range": [
0,
11
]
}
],
"hasChanges": true,
"range": [
0,
11
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"patch": "replace",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
11,
21
]
}
],
"range": [
11,
22
]
}
],
"range": [
11,
22
]
}
],
"hasChanges": false,
"range": [
11,
22
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
13,
23
]
}
],
"range": [
13,
24
]
}
],
"range": [
13,
24
]
}
],
"hasChanges": false,
"range": [
13,
24
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
22,
32
]
}
],
"range": [
22,
33
]
}
],
"range": [
22,
33
]
}
],
"hasChanges": false,
"range": [
22,
33
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
24,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
24,
35
]
}
],
"hasChanges": false,
"range": [
24,
35
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
33,
33
]
}
],
"hasChanges": false,
"range": [
33,
33
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
35,
35
]
}
],
"hasChanges": false,
"range": [
35,
35
],
"number": 4
}
]
],
"paths": [
"template-string.js",
"template-string.js"
],
"oids": [
"657129fcb82d906b47bd27ec31a64fbf62bcea24",
"777fde681ebad68c77e45fd68ee8389038736407"
]
},
"filePaths": [
"template-string.js"
],
"patch": [
"diff --git a/template-string.js b/template-string.js",
"index 657129f..777fde6 100644",
"--- a/template-string.js",
"+++ b/template-string.js",
"@@ -1,3 +1,3 @@",
"-`one line`",
"+`multi line`",
" `one line`",
" `one line`"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "a3a14c9ce30d30111bd78c7b386af50661fca52b..a399a38524f70be2dab1dada1b2ca68a46c824dc"
}
,{
"testCaseDescription": "javascript-template-string-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
12
]
}
],
"patch": "delete",
"range": [
0,
13
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
13,
23
]
}
],
"patch": "delete",
"range": [
13,
24
]
}
],
"range": [
13,
24
]
}
],
"hasChanges": true,
"range": [
13,
24
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
24,
34
]
}
],
"range": [
24,
35
]
}
],
"range": [
24,
35
]
}
],
"hasChanges": false,
"range": [
24,
35
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
10
]
}
],
"range": [
0,
11
]
}
],
"range": [
0,
11
]
}
],
"hasChanges": false,
"range": [
0,
11
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
11,
23
]
}
],
"patch": "insert",
"range": [
11,
24
]
}
],
"range": [
11,
24
]
}
],
"hasChanges": true,
"range": [
11,
24
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
35,
35
]
}
],
"hasChanges": false,
"range": [
35,
35
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 3
}
]
],
"paths": [
"template-string.js",
"template-string.js"
],
"oids": [
"777fde681ebad68c77e45fd68ee8389038736407",
"2b8c0ddef64b5053cfd61236aa5fd4787c0526d9"
]
},
"filePaths": [
"template-string.js"
],
"patch": [
"diff --git a/template-string.js b/template-string.js",
"index 777fde6..2b8c0dd 100644",
"--- a/template-string.js",
"+++ b/template-string.js",
"@@ -1,3 +1,2 @@",
"-`multi line`",
"-`one line`",
" `one line`",
"+`multi line`"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "a399a38524f70be2dab1dada1b2ca68a46c824dc..6b3a90c35b12bd9740d672836684fcc748793a5c"
}
,{
"testCaseDescription": "javascript-template-string-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
10
]
}
],
"patch": "delete",
"range": [
0,
11
]
}
],
"range": [
0,
11
]
}
],
"hasChanges": true,
"range": [
0,
11
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
11,
23
]
}
],
"range": [
11,
24
]
}
],
"range": [
11,
24
]
}
],
"hasChanges": false,
"range": [
11,
24
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": false,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
13,
13
]
}
],
"hasChanges": false,
"range": [
13,
13
],
"number": 2
}
]
],
"paths": [
"template-string.js",
"template-string.js"
],
"oids": [
"2b8c0ddef64b5053cfd61236aa5fd4787c0526d9",
"399f1173e725c2f34cb1caa571752dac17d1d941"
]
},
"filePaths": [
"template-string.js"
],
"patch": [
"diff --git a/template-string.js b/template-string.js",
"index 2b8c0dd..399f117 100644",
"--- a/template-string.js",
"+++ b/template-string.js",
"@@ -1,2 +1 @@",
"-`one line`",
" `multi line`"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "6b3a90c35b12bd9740d672836684fcc748793a5c..30a0c41d47115adb0e6133f2b347a536a97dc59b"
}
,{
"testCaseDescription": "javascript-template-string-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "TemplateString",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"patch": "delete",
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
13,
13
]
}
],
"hasChanges": true,
"range": [
13,
13
],
"number": 2
}
]
],
"paths": [
"template-string.js",
"template-string.js"
],
"oids": [
"399f1173e725c2f34cb1caa571752dac17d1d941",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"template-string.js"
],
"patch": [
"diff --git a/template-string.js b/template-string.js",
"index 399f117..e69de29 100644",
"--- a/template-string.js",
"+++ b/template-string.js",
"@@ -1 +0,0 @@",
"-`multi line`"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "30a0c41d47115adb0e6133f2b347a536a97dc59b..52f50b42f461e7840a4f2f57f62530561ab97768"
}]