1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/ruby/when-else.json
2017-01-18 15:18:45 -05:00

275 lines
7.8 KiB
JSON

[{
"testCaseDescription": "ruby-when-else-setup-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
4
]
}
},
"summary": "Added the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when-else.rb"
],
"patch": [
"diff --git a/when-else.rb b/when-else.rb",
"index e69de29..3c8eff2 100644",
"--- a/when-else.rb",
"+++ b/when-else.rb",
"@@ -0,0 +1,4 @@",
"+case foo",
"+when bar",
"+ baz",
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "fa595ffd700b5088ab5990ee20ffa1e86262e5eb..562b40f87937992c9bf00fb3a9529195e907d8c9"
}
,{
"testCaseDescription": "ruby-when-else-insert-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
5
]
}
},
"summary": "Added an else block in the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when-else.rb"
],
"patch": [
"diff --git a/when-else.rb b/when-else.rb",
"index 3c8eff2..fb2be92 100644",
"--- a/when-else.rb",
"+++ b/when-else.rb",
"@@ -1,4 +1,5 @@",
" case foo",
" when bar",
" baz",
"+else",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "562b40f87937992c9bf00fb3a9529195e907d8c9..6c1209efe637d99934078007ab28ef45e3bdba39"
}
,{
"testCaseDescription": "ruby-when-else-replacement-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
5
]
},
{
"start": [
5,
3
],
"end": [
5,
6
]
}
]
},
"summary": "Replaced an else block with the 'qoz' identifier in the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when-else.rb"
],
"patch": [
"diff --git a/when-else.rb b/when-else.rb",
"index fb2be92..028bb59 100644",
"--- a/when-else.rb",
"+++ b/when-else.rb",
"@@ -2,4 +2,5 @@ case foo",
" when bar",
" baz",
" else",
"+ qoz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "6c1209efe637d99934078007ab28ef45e3bdba39..e5d1d1c588f05de0df3bc326138165bd3563e52f"
}
,{
"testCaseDescription": "ruby-when-else-delete-replacement-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"replace": [
{
"start": [
5,
3
],
"end": [
5,
6
]
},
{
"start": [
4,
1
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'qoz' identifier with an else block in the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when-else.rb"
],
"patch": [
"diff --git a/when-else.rb b/when-else.rb",
"index 028bb59..fb2be92 100644",
"--- a/when-else.rb",
"+++ b/when-else.rb",
"@@ -2,5 +2,4 @@ case foo",
" when bar",
" baz",
" else",
"- qoz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e5d1d1c588f05de0df3bc326138165bd3563e52f..e6d7b1cbfd2a79b0a8a490e850e159b515ede261"
}
,{
"testCaseDescription": "ruby-when-else-delete-insert-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
5
]
}
},
"summary": "Deleted an else block in the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when-else.rb"
],
"patch": [
"diff --git a/when-else.rb b/when-else.rb",
"index fb2be92..3c8eff2 100644",
"--- a/when-else.rb",
"+++ b/when-else.rb",
"@@ -1,5 +1,4 @@",
" case foo",
" when bar",
" baz",
"-else",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e6d7b1cbfd2a79b0a8a490e850e159b515ede261..3fecab18f652050552dfa8dbe3011b6eb71ccc4a"
}
,{
"testCaseDescription": "ruby-when-else-teardown-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
4
]
}
},
"summary": "Deleted the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when-else.rb"
],
"patch": [
"diff --git a/when-else.rb b/when-else.rb",
"index 3c8eff2..e69de29 100644",
"--- a/when-else.rb",
"+++ b/when-else.rb",
"@@ -1,4 +0,0 @@",
"-case foo",
"-when bar",
"- baz",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "3fecab18f652050552dfa8dbe3011b6eb71ccc4a..423bdf5b08ed67aff89dc71f86c560b51a5a8c7b"
}]