mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +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": "759d04410984c3b7b0c25212ef74986fba96a76f..48354aa04a6e30841aa1b0ba10f934aba9d877bb"
|
|
}
|
|
,{
|
|
"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": "48354aa04a6e30841aa1b0ba10f934aba9d877bb..ffef7ac3bf0c394c4b150fc38e7d84bcc0116a90"
|
|
}
|
|
,{
|
|
"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": "ffef7ac3bf0c394c4b150fc38e7d84bcc0116a90..dbf6e3412604ec2bdd35156d5b9ea52e220c5464"
|
|
}
|
|
,{
|
|
"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": "dbf6e3412604ec2bdd35156d5b9ea52e220c5464..3df29e631fd2d388ec3f1aaca908e6b1945e7481"
|
|
}
|
|
,{
|
|
"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": "3df29e631fd2d388ec3f1aaca908e6b1945e7481..70c02489eb082cc5dd59b661bae79c8df0997ea9"
|
|
}
|
|
,{
|
|
"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": "70c02489eb082cc5dd59b661bae79c8df0997ea9..7a71af57bd14a190b95e66a932a58c1f64b3983b"
|
|
}
|
|
,{
|
|
"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": "7a71af57bd14a190b95e66a932a58c1f64b3983b..e805bb575511867c24e67d81ccae909f2668e660"
|
|
}]
|