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/elsif.json

247 lines
6.7 KiB
JSON

[{
"testCaseDescription": "ruby-elsif-setup-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'bar' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index e69de29..89b5cd5 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -0,0 +1,3 @@",
"+if bar",
"+ foo()",
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d571b61c3d53f568ed84cc6dad1c76cea2abe08d..adfbf640ca01c2a8140a30b71499b03d8e9602db"
}
,{
"testCaseDescription": "ruby-elsif-insert-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
4,
1
]
}
},
"summary": "Added the 'baz' elsif block in the 'bar' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 89b5cd5..945e953 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,3 +1,4 @@",
" if bar",
" foo()",
"+elsif baz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "adfbf640ca01c2a8140a30b71499b03d8e9602db..c56c2c77e578103675c05343baa6ac9b57de69c9"
}
,{
"testCaseDescription": "ruby-elsif-replacement-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
4,
8
]
}
},
"summary": "Added the 'qoz()' function call in the 'baz' elsif block"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 945e953..8e4733f 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,4 +1,5 @@",
" if bar",
" foo()",
" elsif baz",
"+ qoz()",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "c56c2c77e578103675c05343baa6ac9b57de69c9..9d868b4d65a258ca50a0432f32d6ce476a0ec90b"
}
,{
"testCaseDescription": "ruby-elsif-delete-replacement-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"delete": {
"start": [
4,
3
],
"end": [
4,
8
]
}
},
"summary": "Deleted the 'qoz()' function call in the 'baz' elsif block"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 8e4733f..945e953 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,5 +1,4 @@",
" if bar",
" foo()",
" elsif baz",
"- qoz()",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "9d868b4d65a258ca50a0432f32d6ce476a0ec90b..ae5492ab9e3097846c7c9365e1dba37799da7cf0"
}
,{
"testCaseDescription": "ruby-elsif-delete-insert-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
4,
1
]
}
},
"summary": "Deleted the 'baz' elsif block in the 'bar' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 945e953..89b5cd5 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,4 +1,3 @@",
" if bar",
" foo()",
"-elsif baz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ae5492ab9e3097846c7c9365e1dba37799da7cf0..3c79699074347065dc50d414845fc7dada45dc0e"
}
,{
"testCaseDescription": "ruby-elsif-teardown-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'bar' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 89b5cd5..e69de29 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,3 +0,0 @@",
"-if bar",
"- foo()",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "3c79699074347065dc50d414845fc7dada45dc0e..291c23618b5574de7402f710d7feba58b0edbcc2"
}]