mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
275 lines
7.8 KiB
JSON
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": "dc728dc832b54a104ba4f5f6847606f10ce8434e..01ee61fbee4403d044d401f766f593991a349d80"
|
|
}
|
|
,{
|
|
"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": "01ee61fbee4403d044d401f766f593991a349d80..e2cee3f7edd1da05314688e59c919723df104364"
|
|
}
|
|
,{
|
|
"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": "e2cee3f7edd1da05314688e59c919723df104364..3b1dd6cfeabbc5e9a1f686e259f784b42ddd5b53"
|
|
}
|
|
,{
|
|
"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": "3b1dd6cfeabbc5e9a1f686e259f784b42ddd5b53..fa37748a47988e386d22c9854cd2274d7e948d1f"
|
|
}
|
|
,{
|
|
"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": "fa37748a47988e386d22c9854cd2274d7e948d1f..374c7e5c98fd2ca82e36c2fbd873cc1fac3ed04e"
|
|
}
|
|
,{
|
|
"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": "374c7e5c98fd2ca82e36c2fbd873cc1fac3ed04e..b9602c073ac5bc70259f26919ec7e80d5cb96e32"
|
|
}]
|