mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
691 lines
22 KiB
JSON
691 lines
22 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-element-reference-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"element-reference.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo[bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo[:bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo[bar]' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"element-reference.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/element-reference.rb b/element-reference.rb",
|
|
"index e69de29..f088562 100644",
|
|
"--- a/element-reference.rb",
|
|
"+++ b/element-reference.rb",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+foo[bar]",
|
|
"+foo[:bar]",
|
|
"+foo[bar] = 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "72f935172c31da7ddd21bf1a12c7baeb4fdb3419..1b88f5fd6eaa6af48eef0522c818919cc89fe0f3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-element-reference-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"element-reference.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[\"b\"]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[:\"c\"]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo[bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo[:bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo[bar]' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"element-reference.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/element-reference.rb b/element-reference.rb",
|
|
"index f088562..7c45cae 100644",
|
|
"--- a/element-reference.rb",
|
|
"+++ b/element-reference.rb",
|
|
"@@ -1,3 +1,8 @@",
|
|
"+x[\"b\"]",
|
|
"+x[:\"c\"]",
|
|
"+foo[bar]",
|
|
"+foo[:bar]",
|
|
"+foo[bar] = 1",
|
|
" foo[bar]",
|
|
" foo[:bar]",
|
|
" foo[bar] = 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "1b88f5fd6eaa6af48eef0522c818919cc89fe0f3..3114590b91f23ee9d8e9656e3c597b7710c5f08a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-element-reference-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"element-reference.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x[\"b\"]' subscript access with the 'foo[bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'foo' identifier in the foo[:bar] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':\"c\"' symbol with the ':bar' symbol in the foo[:bar] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo[bar]' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"element-reference.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/element-reference.rb b/element-reference.rb",
|
|
"index 7c45cae..8e3c23d 100644",
|
|
"--- a/element-reference.rb",
|
|
"+++ b/element-reference.rb",
|
|
"@@ -1,5 +1,6 @@",
|
|
"-x[\"b\"]",
|
|
"-x[:\"c\"]",
|
|
"+foo[bar]",
|
|
"+foo[:bar]",
|
|
"+foo[bar] = 1",
|
|
" foo[bar]",
|
|
" foo[:bar]",
|
|
" foo[bar] = 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "3114590b91f23ee9d8e9656e3c597b7710c5f08a..470abdcd5adc26a44bbd001539d731e36d417046"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-element-reference-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"element-reference.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo[bar]' subscript access with the 'x[\"b\"]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' identifier with the 'x' identifier in the x[:\"c\"] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':bar' symbol with the ':\"c\"' symbol in the x[:\"c\"] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo[bar]' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"element-reference.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/element-reference.rb b/element-reference.rb",
|
|
"index 8e3c23d..7c45cae 100644",
|
|
"--- a/element-reference.rb",
|
|
"+++ b/element-reference.rb",
|
|
"@@ -1,6 +1,5 @@",
|
|
"-foo[bar]",
|
|
"-foo[:bar]",
|
|
"-foo[bar] = 1",
|
|
"+x[\"b\"]",
|
|
"+x[:\"c\"]",
|
|
" foo[bar]",
|
|
" foo[:bar]",
|
|
" foo[bar] = 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "470abdcd5adc26a44bbd001539d731e36d417046..ee5fbeec520aa431dcf290c4a7eb220d2bb2b674"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-element-reference-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"element-reference.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[\"b\"]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[:\"c\"]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo[bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo[:bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo[bar]' assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[\"b\"]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[:\"c\"]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"element-reference.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/element-reference.rb b/element-reference.rb",
|
|
"index 7c45cae..165629c 100644",
|
|
"--- a/element-reference.rb",
|
|
"+++ b/element-reference.rb",
|
|
"@@ -1,8 +1,5 @@",
|
|
"-x[\"b\"]",
|
|
"-x[:\"c\"]",
|
|
"-foo[bar]",
|
|
"-foo[:bar]",
|
|
"-foo[bar] = 1",
|
|
" foo[bar]",
|
|
" foo[:bar]",
|
|
" foo[bar] = 1",
|
|
"+x[\"b\"]",
|
|
"+x[:\"c\"]"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "ee5fbeec520aa431dcf290c4a7eb220d2bb2b674..3fb44d52e9f12fd560773298d89b1721698f358a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-element-reference-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"element-reference.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo[bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo[:bar]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo[bar]' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"element-reference.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/element-reference.rb b/element-reference.rb",
|
|
"index 165629c..d1fa515 100644",
|
|
"--- a/element-reference.rb",
|
|
"+++ b/element-reference.rb",
|
|
"@@ -1,5 +1,2 @@",
|
|
"-foo[bar]",
|
|
"-foo[:bar]",
|
|
"-foo[bar] = 1",
|
|
" x[\"b\"]",
|
|
" x[:\"c\"]"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "3fb44d52e9f12fd560773298d89b1721698f358a..0207d27c72e4662c924f3f408396247dbc990739"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-element-reference-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"element-reference.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[\"b\"]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[:\"c\"]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"element-reference.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/element-reference.rb b/element-reference.rb",
|
|
"index d1fa515..e69de29 100644",
|
|
"--- a/element-reference.rb",
|
|
"+++ b/element-reference.rb",
|
|
"@@ -1,2 +0,0 @@",
|
|
"-x[\"b\"]",
|
|
"-x[:\"c\"]"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "0207d27c72e4662c924f3f408396247dbc990739..72e1f4912f54a936266422abbb53a9c2fc864992"
|
|
}]
|