mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
245 lines
6.6 KiB
JSON
245 lines
6.6 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-begin-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo()' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin.rb b/begin.rb",
|
|
"index e69de29..ff7bbbe 100644",
|
|
"--- a/begin.rb",
|
|
"+++ b/begin.rb",
|
|
"@@ -0,0 +1,2 @@",
|
|
"+def foo",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "4eacc49b5f467acdc98a2f6fcbf75de7da19eef6..0794db6dce31caa4bffcfdabbd0c1e5e578217db"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement in the 'foo()' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin.rb b/begin.rb",
|
|
"index ff7bbbe..7b4a3be 100644",
|
|
"--- a/begin.rb",
|
|
"+++ b/begin.rb",
|
|
"@@ -1,2 +1,4 @@",
|
|
" def foo",
|
|
"+begin",
|
|
"+end",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "0794db6dce31caa4bffcfdabbd0c1e5e578217db..d883591fc11b8afcd262d52a263529abaf9a2b28"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
3
|
|
],
|
|
"end": [
|
|
3,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'puts('hi')' method call in a begin statement of the 'foo()' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin.rb b/begin.rb",
|
|
"index 7b4a3be..7879e55 100644",
|
|
"--- a/begin.rb",
|
|
"+++ b/begin.rb",
|
|
"@@ -1,4 +1,5 @@",
|
|
" def foo",
|
|
" begin",
|
|
"+ puts 'hi'",
|
|
" end",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "d883591fc11b8afcd262d52a263529abaf9a2b28..563f2de4fe7d19d0fcd5645c80b66cf93a11823f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
3
|
|
],
|
|
"end": [
|
|
3,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'puts('hi')' method call in a begin statement of the 'foo()' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin.rb b/begin.rb",
|
|
"index 7879e55..7b4a3be 100644",
|
|
"--- a/begin.rb",
|
|
"+++ b/begin.rb",
|
|
"@@ -1,5 +1,4 @@",
|
|
" def foo",
|
|
" begin",
|
|
"- puts 'hi'",
|
|
" end",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "563f2de4fe7d19d0fcd5645c80b66cf93a11823f..df3b886dc25ec9fdb48286a907485de08cd56e80"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement in the 'foo()' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin.rb b/begin.rb",
|
|
"index 7b4a3be..ff7bbbe 100644",
|
|
"--- a/begin.rb",
|
|
"+++ b/begin.rb",
|
|
"@@ -1,4 +1,2 @@",
|
|
" def foo",
|
|
"-begin",
|
|
"-end",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "df3b886dc25ec9fdb48286a907485de08cd56e80..96d6f4ae35a03b9c32eb5ef74fba8c309f78ca9d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo()' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin.rb b/begin.rb",
|
|
"index ff7bbbe..e69de29 100644",
|
|
"--- a/begin.rb",
|
|
"+++ b/begin.rb",
|
|
"@@ -1,2 +0,0 @@",
|
|
"-def foo",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "96d6f4ae35a03b9c32eb5ef74fba8c309f78ca9d..f339f2398d372b2c568b3e1370d4e8d9bac0c32e"
|
|
}]
|