1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/ruby/ensure.json
2016-11-07 10:26:59 -08:00

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": "f6f1229dfdaa0bf7f5b33425764b3b4423e6e28c..b10ccba8ad4f11f74e74fe5eca3b97e5a604aff2"
}
,{
"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": "b10ccba8ad4f11f74e74fe5eca3b97e5a604aff2..fa5e430655c2dcff9f8c706046b6c5a230172103"
}
,{
"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 an '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": "fa5e430655c2dcff9f8c706046b6c5a230172103..5eb9ced9edc1f64762468d4378055a3c44c7688c"
}
,{
"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 the 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": "5eb9ced9edc1f64762468d4378055a3c44c7688c..a8e6dd4fff6bf1580be14213e216207ed53cf059"
}
,{
"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": "a8e6dd4fff6bf1580be14213e216207ed53cf059..324595aac765613b219d4e80d627e6eb186cec57"
}
,{
"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": "324595aac765613b219d4e80d627e6eb186cec57..5df8bfbe172193e6124da27f457fa6fb19547593"
}]