mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
364 lines
9.9 KiB
JSON
364 lines
9.9 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-rescue-empty-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-empty.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-empty.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-empty.rb b/rescue-empty.rb",
|
|
"index e69de29..5b4fe96 100644",
|
|
"--- a/rescue-empty.rb",
|
|
"+++ b/rescue-empty.rb",
|
|
"@@ -0,0 +1,4 @@",
|
|
"+begin",
|
|
"+ foo",
|
|
"+rescue",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "d207779b8d1ea6c6bb2ea1d9153bf726cac20b43..302b32ea9c6c5caba3797c0c807d68b3154c9fc4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-empty-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-empty.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
9,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-empty.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-empty.rb b/rescue-empty.rb",
|
|
"index 5b4fe96..d74e034 100644",
|
|
"--- a/rescue-empty.rb",
|
|
"+++ b/rescue-empty.rb",
|
|
"@@ -1,4 +1,13 @@",
|
|
" begin",
|
|
" foo",
|
|
" rescue",
|
|
"+ bar",
|
|
"+end",
|
|
"+begin",
|
|
"+ foo",
|
|
"+rescue",
|
|
"+end",
|
|
"+begin",
|
|
"+ foo",
|
|
"+rescue",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "302b32ea9c6c5caba3797c0c807d68b3154c9fc4..c39579f952fc2d9fe9ead94087371ea0aa967753"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-empty-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-empty.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar' identifier in a rescue block"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-empty.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-empty.rb b/rescue-empty.rb",
|
|
"index d74e034..afdc934 100644",
|
|
"--- a/rescue-empty.rb",
|
|
"+++ b/rescue-empty.rb",
|
|
"@@ -1,7 +1,6 @@",
|
|
" begin",
|
|
" foo",
|
|
" rescue",
|
|
"- bar",
|
|
" end",
|
|
" begin",
|
|
" foo"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "c39579f952fc2d9fe9ead94087371ea0aa967753..3c01fa199f683b11983a9420f9d41fc9ba9617e7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-empty-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-empty.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar' identifier in a rescue block"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-empty.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-empty.rb b/rescue-empty.rb",
|
|
"index afdc934..d74e034 100644",
|
|
"--- a/rescue-empty.rb",
|
|
"+++ b/rescue-empty.rb",
|
|
"@@ -1,6 +1,7 @@",
|
|
" begin",
|
|
" foo",
|
|
" rescue",
|
|
"+ bar",
|
|
" end",
|
|
" begin",
|
|
" foo"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "3c01fa199f683b11983a9420f9d41fc9ba9617e7..bf04f796be278a999b99f226a75d2a8229fa6282"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-empty-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-empty.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
9,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
9,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-empty.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-empty.rb b/rescue-empty.rb",
|
|
"index d74e034..f8a72a7 100644",
|
|
"--- a/rescue-empty.rb",
|
|
"+++ b/rescue-empty.rb",
|
|
"@@ -1,13 +1,9 @@",
|
|
" begin",
|
|
" foo",
|
|
" rescue",
|
|
"- bar",
|
|
"-end",
|
|
"-begin",
|
|
"- foo",
|
|
"-rescue",
|
|
" end",
|
|
" begin",
|
|
" foo",
|
|
" rescue",
|
|
"+ bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "bf04f796be278a999b99f226a75d2a8229fa6282..f697c6d5f13e170e711b2a4de937c00067b630dd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-empty-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-empty.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-empty.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-empty.rb b/rescue-empty.rb",
|
|
"index f8a72a7..17dffb3 100644",
|
|
"--- a/rescue-empty.rb",
|
|
"+++ b/rescue-empty.rb",
|
|
"@@ -1,9 +1,5 @@",
|
|
" begin",
|
|
" foo",
|
|
" rescue",
|
|
"-end",
|
|
"-begin",
|
|
"- foo",
|
|
"-rescue",
|
|
" bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "f697c6d5f13e170e711b2a4de937c00067b630dd..830f62b9a58e19eb9e69c60a509f157d6b1c0b16"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-empty-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-empty.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-empty.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-empty.rb b/rescue-empty.rb",
|
|
"index 17dffb3..e69de29 100644",
|
|
"--- a/rescue-empty.rb",
|
|
"+++ b/rescue-empty.rb",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-begin",
|
|
"- foo",
|
|
"-rescue",
|
|
"- bar",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "830f62b9a58e19eb9e69c60a509f157d6b1c0b16..4d42cd808c7be49045f78b820af2fe281bd29591"
|
|
}]
|