mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
247 lines
6.6 KiB
JSON
247 lines
6.6 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-rescue-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue.rb b/rescue.rb",
|
|
"index e69de29..dbcd28c 100644",
|
|
"--- a/rescue.rb",
|
|
"+++ b/rescue.rb",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+begin",
|
|
"+ foo",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "0dee35eeec78d1497cbe8dbc3f5fd9520dae7592..0ac7f818f78505c1270a18df50da640f2e6a0d02"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' rescue block in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue.rb b/rescue.rb",
|
|
"index dbcd28c..fd1f6b9 100644",
|
|
"--- a/rescue.rb",
|
|
"+++ b/rescue.rb",
|
|
"@@ -1,3 +1,4 @@",
|
|
" begin",
|
|
" foo",
|
|
"+rescue x",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "0ac7f818f78505c1270a18df50da640f2e6a0d02..eb4e5b624e5c523f5728be389bf75aba0c8248ae"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar' identifier in the 'x' rescue block"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue.rb b/rescue.rb",
|
|
"index fd1f6b9..e83ea4c 100644",
|
|
"--- a/rescue.rb",
|
|
"+++ b/rescue.rb",
|
|
"@@ -1,4 +1,5 @@",
|
|
" begin",
|
|
" foo",
|
|
" rescue x",
|
|
"+ bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "eb4e5b624e5c523f5728be389bf75aba0c8248ae..b364c4722ff71fd75f9dd43844cb4e88e5eaec60"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar' identifier in the 'x' rescue block"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue.rb b/rescue.rb",
|
|
"index e83ea4c..fd1f6b9 100644",
|
|
"--- a/rescue.rb",
|
|
"+++ b/rescue.rb",
|
|
"@@ -1,5 +1,4 @@",
|
|
" begin",
|
|
" foo",
|
|
" rescue x",
|
|
"- bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "b364c4722ff71fd75f9dd43844cb4e88e5eaec60..077cb77a1c5925d3e131b84b726f689961de0c0b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' rescue block in a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue.rb b/rescue.rb",
|
|
"index fd1f6b9..dbcd28c 100644",
|
|
"--- a/rescue.rb",
|
|
"+++ b/rescue.rb",
|
|
"@@ -1,4 +1,3 @@",
|
|
" begin",
|
|
" foo",
|
|
"-rescue x",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "077cb77a1c5925d3e131b84b726f689961de0c0b..de9313c214834626a7527d5762d1b796f291455b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted a begin statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue.rb b/rescue.rb",
|
|
"index dbcd28c..e69de29 100644",
|
|
"--- a/rescue.rb",
|
|
"+++ b/rescue.rb",
|
|
"@@ -1,3 +0,0 @@",
|
|
"-begin",
|
|
"- foo",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "de9313c214834626a7527d5762d1b796f291455b..d207779b8d1ea6c6bb2ea1d9153bf726cac20b43"
|
|
}]
|