1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00
semantic/test/corpus/diff-summaries/ruby/ensure.json

247 lines
6.6 KiB
JSON
Raw Normal View History

[{
"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": "291c23618b5574de7402f710d7feba58b0edbcc2..f52d02d0007fbcf6d4447578ae0f085e5c995bef"
}
,{
"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": "f52d02d0007fbcf6d4447578ae0f085e5c995bef..999a581cd8dc26f89cd2145133271109ef2504f3"
}
,{
"testCaseDescription": "ruby-ensure-replacement-test",
"expectedResult": {
"changes": {
"ensure.rb": [
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
4,
6
]
}
},
"summary": "Added the 'bar' identifier in an ensure block"
}
]
},
"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": "999a581cd8dc26f89cd2145133271109ef2504f3..fad947ef36d88b7e323747c024af8904eceedede"
}
,{
"testCaseDescription": "ruby-ensure-delete-replacement-test",
"expectedResult": {
"changes": {
"ensure.rb": [
{
"span": {
"delete": {
"start": [
4,
3
],
"end": [
4,
6
]
}
},
"summary": "Deleted the 'bar' identifier in an ensure block"
}
]
},
"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": "fad947ef36d88b7e323747c024af8904eceedede..5bb953c9575b80ac5bc457ceed86b67092944a8c"
}
,{
"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": "5bb953c9575b80ac5bc457ceed86b67092944a8c..9e3babd9f3ba565f0d1d9ab6e24a2de63adefb87"
}
,{
"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": "9e3babd9f3ba565f0d1d9ab6e24a2de63adefb87..7d242e1a703020b3d44a44dfca02698401fd5888"
}]