1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/ruby/rescue-modifier2.json
2016-11-04 12:29:02 -07:00

348 lines
11 KiB
JSON

[{
"testCaseDescription": "ruby-rescue-modifier2-insert-test",
"expectedResult": {
"changes": {
"rescue-modifier2.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Added the 'foo' rescue modifier"
}
]
},
"errors": {}
},
"filePaths": [
"rescue-modifier2.rb"
],
"patch": [
"diff --git a/rescue-modifier2.rb b/rescue-modifier2.rb",
"index e69de29..b0cea1a 100644",
"--- a/rescue-modifier2.rb",
"+++ b/rescue-modifier2.rb",
"@@ -0,0 +1 @@",
"+foo rescue nil"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "89be77a7b4f5ee9670276a33a97a6aa3941c9cfb..55cdbc8c69ef00db47f231d904f083eb28f50160"
}
,{
"testCaseDescription": "ruby-rescue-modifier2-replacement-insert-test",
"expectedResult": {
"changes": {
"rescue-modifier2.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Added the 'bar' rescue modifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
15
]
}
},
"summary": "Added the 'foo' rescue modifier"
}
]
},
"errors": {}
},
"filePaths": [
"rescue-modifier2.rb"
],
"patch": [
"diff --git a/rescue-modifier2.rb b/rescue-modifier2.rb",
"index b0cea1a..595bf2e 100644",
"--- a/rescue-modifier2.rb",
"+++ b/rescue-modifier2.rb",
"@@ -1 +1,3 @@",
"+bar rescue nil",
"+foo rescue nil",
" foo rescue nil"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "55cdbc8c69ef00db47f231d904f083eb28f50160..198f5f3b96b3f405c1ff2081a511fac17edc7c91"
}
,{
"testCaseDescription": "ruby-rescue-modifier2-delete-insert-test",
"expectedResult": {
"changes": {
"rescue-modifier2.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
4
]
},
{
"start": [
1,
1
],
"end": [
1,
4
]
}
]
},
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the 'rescue foo' modifier"
}
]
},
"errors": {}
},
"filePaths": [
"rescue-modifier2.rb"
],
"patch": [
"diff --git a/rescue-modifier2.rb b/rescue-modifier2.rb",
"index 595bf2e..f59c8c2 100644",
"--- a/rescue-modifier2.rb",
"+++ b/rescue-modifier2.rb",
"@@ -1,3 +1,3 @@",
"-bar rescue nil",
"+foo rescue nil",
" foo rescue nil",
" foo rescue nil"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "198f5f3b96b3f405c1ff2081a511fac17edc7c91..1e6f032a4125e945220103becbd30842264ab52e"
}
,{
"testCaseDescription": "ruby-rescue-modifier2-replacement-test",
"expectedResult": {
"changes": {
"rescue-modifier2.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
4
]
},
{
"start": [
1,
1
],
"end": [
1,
4
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the 'rescue bar' modifier"
}
]
},
"errors": {}
},
"filePaths": [
"rescue-modifier2.rb"
],
"patch": [
"diff --git a/rescue-modifier2.rb b/rescue-modifier2.rb",
"index f59c8c2..595bf2e 100644",
"--- a/rescue-modifier2.rb",
"+++ b/rescue-modifier2.rb",
"@@ -1,3 +1,3 @@",
"-foo rescue nil",
"+bar rescue nil",
" foo rescue nil",
" foo rescue nil"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "1e6f032a4125e945220103becbd30842264ab52e..a666824e8c4d5b66c6d27e6a0246b63a3042b7a0"
}
,{
"testCaseDescription": "ruby-rescue-modifier2-delete-replacement-test",
"expectedResult": {
"changes": {
"rescue-modifier2.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Deleted the 'bar' rescue modifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
15
]
}
},
"summary": "Deleted the 'foo' rescue modifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
15
]
}
},
"summary": "Added the 'bar' rescue modifier"
}
]
},
"errors": {}
},
"filePaths": [
"rescue-modifier2.rb"
],
"patch": [
"diff --git a/rescue-modifier2.rb b/rescue-modifier2.rb",
"index 595bf2e..0d0f274 100644",
"--- a/rescue-modifier2.rb",
"+++ b/rescue-modifier2.rb",
"@@ -1,3 +1,2 @@",
"-bar rescue nil",
"-foo rescue nil",
" foo rescue nil",
"+bar rescue nil"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a666824e8c4d5b66c6d27e6a0246b63a3042b7a0..14d5975cd55f2b7d27ce40f3491786b5644c10a6"
}
,{
"testCaseDescription": "ruby-rescue-modifier2-delete-test",
"expectedResult": {
"changes": {
"rescue-modifier2.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Deleted the 'foo' rescue modifier"
}
]
},
"errors": {}
},
"filePaths": [
"rescue-modifier2.rb"
],
"patch": [
"diff --git a/rescue-modifier2.rb b/rescue-modifier2.rb",
"index 0d0f274..f7b54a5 100644",
"--- a/rescue-modifier2.rb",
"+++ b/rescue-modifier2.rb",
"@@ -1,2 +1 @@",
"-foo rescue nil",
" bar rescue nil"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "14d5975cd55f2b7d27ce40f3491786b5644c10a6..0446bcdbd6fc1e4f75ecdd984d9428c2d82e4c2a"
}
,{
"testCaseDescription": "ruby-rescue-modifier2-delete-rest-test",
"expectedResult": {
"changes": {
"rescue-modifier2.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Deleted the 'bar' rescue modifier"
}
]
},
"errors": {}
},
"filePaths": [
"rescue-modifier2.rb"
],
"patch": [
"diff --git a/rescue-modifier2.rb b/rescue-modifier2.rb",
"index f7b54a5..e69de29 100644",
"--- a/rescue-modifier2.rb",
"+++ b/rescue-modifier2.rb",
"@@ -1 +0,0 @@",
"-bar rescue nil"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0446bcdbd6fc1e4f75ecdd984d9428c2d82e4c2a..375e457b7d8886bdbdb8b3e131a0c001d20ac41c"
}]