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/when.json
2016-11-03 16:02:56 -07:00

241 lines
6.5 KiB
JSON

[{
"testCaseDescription": "ruby-when-setup-test",
"expectedResult": {
"changes": {
"when.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
2,
4
]
}
},
"summary": "Added the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when.rb"
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index e69de29..ee23477 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -0,0 +1,2 @@",
"+case foo",
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "dc9d24ac927d2ba1f4d7331d5edcf9888c6bfbdf..8584062d9a54a14c1af0ac949bf9be286269f7f7"
}
,{
"testCaseDescription": "ruby-when-insert-test",
"expectedResult": {
"changes": {
"when.rb": [
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
3,
1
]
}
},
"summary": "Added the 'bar' when comparison in the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when.rb"
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index ee23477..92a40ca 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,2 +1,3 @@",
" case foo",
"+when bar",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "8584062d9a54a14c1af0ac949bf9be286269f7f7..522104f5e945e8b8529bcf56c273953d72594afa"
}
,{
"testCaseDescription": "ruby-when-replacement-test",
"expectedResult": {
"changes": {
"when.rb": [
{
"span": {
"insert": {
"start": [
3,
3
],
"end": [
3,
6
]
}
},
"summary": "Added the 'baz' identifier in a when comparison"
}
]
},
"errors": {}
},
"filePaths": [
"when.rb"
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index 92a40ca..3c8eff2 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,3 +1,4 @@",
" case foo",
" when bar",
"+ baz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "522104f5e945e8b8529bcf56c273953d72594afa..c35811be8fcc9afe2fad9fd988d9e95189c58765"
}
,{
"testCaseDescription": "ruby-when-delete-replacement-test",
"expectedResult": {
"changes": {
"when.rb": [
{
"span": {
"delete": {
"start": [
3,
3
],
"end": [
3,
6
]
}
},
"summary": "Deleted the 'baz' identifier in a when comparison"
}
]
},
"errors": {}
},
"filePaths": [
"when.rb"
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index 3c8eff2..92a40ca 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,4 +1,3 @@",
" case foo",
" when bar",
"- baz",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "c35811be8fcc9afe2fad9fd988d9e95189c58765..d091c742bdff6528f0464c6a0e1d369f6060ed1d"
}
,{
"testCaseDescription": "ruby-when-delete-insert-test",
"expectedResult": {
"changes": {
"when.rb": [
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
3,
1
]
}
},
"summary": "Deleted the 'bar' when comparison in the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when.rb"
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index 92a40ca..ee23477 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,3 +1,2 @@",
" case foo",
"-when bar",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d091c742bdff6528f0464c6a0e1d369f6060ed1d..0d554900e6183bbfd1dc9ed4b90ffb74901991d6"
}
,{
"testCaseDescription": "ruby-when-teardown-test",
"expectedResult": {
"changes": {
"when.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2,
4
]
}
},
"summary": "Deleted the 'foo' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"when.rb"
],
"patch": [
"diff --git a/when.rb b/when.rb",
"index ee23477..e69de29 100644",
"--- a/when.rb",
"+++ b/when.rb",
"@@ -1,2 +0,0 @@",
"-case foo",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0d554900e6183bbfd1dc9ed4b90ffb74901991d6..c723ad6d1865bc31b8b6d554c0768635937c0ab3"
}]