mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
271 lines
7.6 KiB
JSON
271 lines
7.6 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-ensure-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ensure.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ensure.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/ensure.rb b/ensure.rb",
|
|
"index e69de29..dbcd28c 100644",
|
|
"--- a/ensure.rb",
|
|
"+++ b/ensure.rb",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+begin",
|
|
"+ foo",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "c9324f6d805b5349f5d275226b0157b70b153b94..f6302f22793b271d165a850fcf74fbe1d5e9d0c8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ensure-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ensure.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an ensure block in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ensure.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/ensure.rb b/ensure.rb",
|
|
"index dbcd28c..4332810 100644",
|
|
"--- a/ensure.rb",
|
|
"+++ b/ensure.rb",
|
|
"@@ -1,3 +1,4 @@",
|
|
" begin",
|
|
" foo",
|
|
"+ensure",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "f6302f22793b271d165a850fcf74fbe1d5e9d0c8..a440481d549c778f964e24da31ca98a446a4e481"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ensure-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ensure.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced an ensure block with the 'bar' identifier in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ensure.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/ensure.rb b/ensure.rb",
|
|
"index 4332810..ddde828 100644",
|
|
"--- a/ensure.rb",
|
|
"+++ b/ensure.rb",
|
|
"@@ -1,4 +1,5 @@",
|
|
" begin",
|
|
" foo",
|
|
" ensure",
|
|
"+ bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "a440481d549c778f964e24da31ca98a446a4e481..00d2785bce4e852bfaea9295a10917383e724ca3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ensure-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ensure.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'bar' identifier with an ensure block in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ensure.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/ensure.rb b/ensure.rb",
|
|
"index ddde828..4332810 100644",
|
|
"--- a/ensure.rb",
|
|
"+++ b/ensure.rb",
|
|
"@@ -1,5 +1,4 @@",
|
|
" begin",
|
|
" foo",
|
|
" ensure",
|
|
"- bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "00d2785bce4e852bfaea9295a10917383e724ca3..59a330ae574f202eb8cd355c02bcf94c36f31c07"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ensure-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ensure.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an ensure block in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ensure.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/ensure.rb b/ensure.rb",
|
|
"index 4332810..dbcd28c 100644",
|
|
"--- a/ensure.rb",
|
|
"+++ b/ensure.rb",
|
|
"@@ -1,4 +1,3 @@",
|
|
" begin",
|
|
" foo",
|
|
"-ensure",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "59a330ae574f202eb8cd355c02bcf94c36f31c07..f15a4dbc8e73fb8e2a32e51a325ff5a61905317b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ensure-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ensure.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ensure.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/ensure.rb b/ensure.rb",
|
|
"index dbcd28c..e69de29 100644",
|
|
"--- a/ensure.rb",
|
|
"+++ b/ensure.rb",
|
|
"@@ -1,3 +0,0 @@",
|
|
"-begin",
|
|
"- foo",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "f15a4dbc8e73fb8e2a32e51a325ff5a61905317b..0dee35eeec78d1497cbe8dbc3f5fd9520dae7592"
|
|
}]
|