1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/ruby/when-else.json
2016-11-03 16:02:56 -07:00

251 lines
6.9 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": "c723ad6d1865bc31b8b6d554c0768635937c0ab3..283ae1e6221f0617fd5ec6d20db443579bfa869b"
}
,{
"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": "283ae1e6221f0617fd5ec6d20db443579bfa869b..639f5d0d1b1e4ae8a3f7aa870c4edaa8de2e1658"
}
,{
"testCaseDescription": "ruby-when-else-replacement-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"insert": {
"start": [
5,
3
],
"end": [
5,
6
]
}
},
"summary": "Added the 'qoz' identifier in an else block"
}
]
},
"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": "639f5d0d1b1e4ae8a3f7aa870c4edaa8de2e1658..60681cda49b81c0c9372b049209a373135f2da77"
}
,{
"testCaseDescription": "ruby-when-else-delete-replacement-test",
"expectedResult": {
"changes": {
"when-else.rb": [
{
"span": {
"delete": {
"start": [
5,
3
],
"end": [
5,
6
]
}
},
"summary": "Deleted the 'qoz' identifier in an else block"
}
]
},
"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": "60681cda49b81c0c9372b049209a373135f2da77..13946aba199ec4be3a9a7d11815fd5dd987c3c3b"
}
,{
"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": "13946aba199ec4be3a9a7d11815fd5dd987c3c3b..53011c7928dc7a14a2e1aa5605dd08cd4ad34de5"
}
,{
"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": "53011c7928dc7a14a2e1aa5605dd08cd4ad34de5..dbbf1ed8a8cafe556ea468af463f118f3ca0f4ba"
}]