1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00
semantic/test/corpus/diff-summaries/ruby/rescue.json

247 lines
6.6 KiB
JSON
Raw Normal View History

2016-11-02 23:05:30 +03:00
[{
2016-11-03 23:26:53 +03:00
"testCaseDescription": "ruby-rescue-setup-test",
2016-11-02 23:05:30 +03:00
"expectedResult": {
"changes": {
"rescue.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
2016-11-03 23:26:53 +03:00
3,
2016-11-02 23:05:30 +03:00
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"
],
2016-11-02 23:05:30 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "7d242e1a703020b3d44a44dfca02698401fd5888..c1c1d85a11ab375b2a5cecfa753ce55794695893"
2016-11-02 23:05:30 +03:00
}
,{
2016-11-03 23:26:53 +03:00
"testCaseDescription": "ruby-rescue-insert-test",
2016-11-02 23:05:30 +03:00
"expectedResult": {
"changes": {
"rescue.rb": [
{
"span": {
"insert": {
"start": [
2016-11-03 23:26:53 +03:00
3,
2016-11-02 23:05:30 +03:00
1
],
"end": [
4,
2016-11-03 23:26:53 +03:00
1
2016-11-02 23:05:30 +03:00
]
}
},
2016-11-03 23:26:53 +03:00
"summary": "Added the 'x' rescue block in a begin statement"
2016-11-02 23:05:30 +03:00
}
]
},
"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"
],
2016-11-02 23:05:30 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "c1c1d85a11ab375b2a5cecfa753ce55794695893..d2e5d09c09142af88df3e14e001d4f8b3c50400b"
2016-11-02 23:05:30 +03:00
}
,{
"testCaseDescription": "ruby-rescue-replacement-test",
"expectedResult": {
"changes": {
"rescue.rb": [
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
4,
6
]
}
},
2016-11-03 03:18:09 +03:00
"summary": "Added the 'bar' identifier in the 'x' rescue block"
2016-11-02 23:05:30 +03:00
}
]
},
"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"
],
2016-11-02 23:05:30 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "d2e5d09c09142af88df3e14e001d4f8b3c50400b..29ff959d72ec67c93481eb566a450a91a5fdb5e3"
2016-11-02 23:05:30 +03:00
}
,{
"testCaseDescription": "ruby-rescue-delete-replacement-test",
"expectedResult": {
"changes": {
"rescue.rb": [
{
"span": {
"delete": {
"start": [
2016-11-03 23:26:53 +03:00
4,
3
2016-11-02 23:05:30 +03:00
],
"end": [
2016-11-03 23:26:53 +03:00
4,
6
2016-11-02 23:05:30 +03:00
]
}
},
2016-11-03 23:26:53 +03:00
"summary": "Deleted the 'bar' identifier in the 'x' rescue block"
2016-11-02 23:05:30 +03:00
}
]
},
"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"
],
2016-11-02 23:05:30 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "29ff959d72ec67c93481eb566a450a91a5fdb5e3..1e5060ad564b33df252b8ebe36db76da23c71d11"
2016-11-02 23:05:30 +03:00
}
,{
2016-11-03 23:26:53 +03:00
"testCaseDescription": "ruby-rescue-delete-insert-test",
2016-11-02 23:05:30 +03:00
"expectedResult": {
"changes": {
"rescue.rb": [
{
"span": {
"delete": {
"start": [
2016-11-03 23:26:53 +03:00
3,
2016-11-02 23:05:30 +03:00
1
],
"end": [
4,
2016-11-03 23:26:53 +03:00
1
2016-11-02 23:05:30 +03:00
]
}
},
2016-11-03 23:26:53 +03:00
"summary": "Deleted the 'x' rescue block in a begin statement"
2016-11-02 23:05:30 +03:00
}
]
},
"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"
],
2016-11-02 23:05:30 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "1e5060ad564b33df252b8ebe36db76da23c71d11..742f43f551628274941ad509b4d47a9467022038"
2016-11-02 23:05:30 +03:00
}
,{
2016-11-03 23:26:53 +03:00
"testCaseDescription": "ruby-rescue-teardown-test",
2016-11-02 23:05:30 +03:00
"expectedResult": {
"changes": {
"rescue.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2016-11-03 23:26:53 +03:00
3,
2016-11-02 23:05:30 +03:00
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"
],
2016-11-02 23:05:30 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "742f43f551628274941ad509b4d47a9467022038..759d04410984c3b7b0c25212ef74986fba96a76f"
2016-11-02 23:05:30 +03:00
}]