mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
247 lines
6.5 KiB
JSON
247 lines
6.5 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-else-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"else.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"else.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/else.rb b/else.rb",
|
|
"index e69de29..d2757f9 100644",
|
|
"--- a/else.rb",
|
|
"+++ b/else.rb",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+begin",
|
|
"+ foo()",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "cc81318f97e858789ab75eb6e9c4a9ef9a96807c..33bc769c08469883737fe1140d2144dc561d0d81"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-else-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"else.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an else block in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"else.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/else.rb b/else.rb",
|
|
"index d2757f9..09f6b12 100644",
|
|
"--- a/else.rb",
|
|
"+++ b/else.rb",
|
|
"@@ -1,3 +1,4 @@",
|
|
" begin",
|
|
" foo()",
|
|
"+else",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "33bc769c08469883737fe1140d2144dc561d0d81..96b6809efbb8797d78b2b81d56d17340c9035538"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-else-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"else.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar()' function call in an else block"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"else.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/else.rb b/else.rb",
|
|
"index 09f6b12..f9c269d 100644",
|
|
"--- a/else.rb",
|
|
"+++ b/else.rb",
|
|
"@@ -1,4 +1,5 @@",
|
|
" begin",
|
|
" foo()",
|
|
" else",
|
|
"+ bar()",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "96b6809efbb8797d78b2b81d56d17340c9035538..e57a5478d9f5f42241e37c822610bf478930673f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-else-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"else.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar()' function call in an else block"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"else.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/else.rb b/else.rb",
|
|
"index f9c269d..09f6b12 100644",
|
|
"--- a/else.rb",
|
|
"+++ b/else.rb",
|
|
"@@ -1,5 +1,4 @@",
|
|
" begin",
|
|
" foo()",
|
|
" else",
|
|
"- bar()",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "e57a5478d9f5f42241e37c822610bf478930673f..876365e1b571b6c9641bf92e5baca7662e0ebc4f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-else-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"else.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an else block in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"else.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/else.rb b/else.rb",
|
|
"index 09f6b12..d2757f9 100644",
|
|
"--- a/else.rb",
|
|
"+++ b/else.rb",
|
|
"@@ -1,4 +1,3 @@",
|
|
" begin",
|
|
" foo()",
|
|
"-else",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "876365e1b571b6c9641bf92e5baca7662e0ebc4f..3067849e0a352190b4d636187878720d8d6e6b17"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-else-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"else.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"else.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/else.rb b/else.rb",
|
|
"index d2757f9..e69de29 100644",
|
|
"--- a/else.rb",
|
|
"+++ b/else.rb",
|
|
"@@ -1,3 +0,0 @@",
|
|
"-begin",
|
|
"- foo()",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "3067849e0a352190b4d636187878720d8d6e6b17..d571b61c3d53f568ed84cc6dad1c76cea2abe08d"
|
|
}]
|