mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
348 lines
11 KiB
JSON
348 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-subscript-access-variable-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index e69de29b..9a7b3d3e 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "ec6eea34d7c86b61e0a52fbb0b8041553b1d5af7..6dad82818c86126ce330a9cd7c093a76efb8cdaf"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someOtherVariable]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 9a7b3d3e..000d190c 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+x[someOtherVariable];",
|
|
"+x[someVariable];",
|
|
" x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "6dad82818c86126ce330a9cd7c093a76efb8cdaf..8c1c5fde4aa2169750f7d2f703c68e42b471ecf7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'someOtherVariable' identifier with the 'someVariable' identifier in the x[someVariable] subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 000d190c..01f61ef9 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x[someOtherVariable];",
|
|
"+x[someVariable];",
|
|
" x[someVariable];",
|
|
" x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8c1c5fde4aa2169750f7d2f703c68e42b471ecf7..53bf9e0f19f42594d579ccbee1163f429a1c14c6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'someVariable' identifier with the 'someOtherVariable' identifier in the x[someOtherVariable] subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 01f61ef9..000d190c 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x[someVariable];",
|
|
"+x[someOtherVariable];",
|
|
" x[someVariable];",
|
|
" x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "53bf9e0f19f42594d579ccbee1163f429a1c14c6..edb73e95c59b9fe91874106f30628ab26c22cbdb"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someOtherVariable]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someVariable]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someOtherVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 000d190c..2aaae7e7 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x[someOtherVariable];",
|
|
"-x[someVariable];",
|
|
" x[someVariable];",
|
|
"+x[someOtherVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "edb73e95c59b9fe91874106f30628ab26c22cbdb..d29bb5ba94f278f6e77172dcbdd30d4fcadebba2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 2aaae7e7..baa3661b 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-x[someVariable];",
|
|
" x[someOtherVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d29bb5ba94f278f6e77172dcbdd30d4fcadebba2..52c8ed9cb96dc3d7f79305d80304cca93f0c2775"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someOtherVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index baa3661b..e69de29b 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-x[someOtherVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "52c8ed9cb96dc3d7f79305d80304cca93f0c2775..e8224a02e3ba0dc00add706c1568127b3ae6182b"
|
|
}]
|