1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/ruby/begin-block.json

411 lines
12 KiB
JSON
Raw Normal View History

2016-12-13 00:41:55 +03:00
[{
"testCaseDescription": "ruby-begin-block-insert-test",
"expectedResult": {
"changes": {
"begin-block.rb": [
{
"span": {
"insert": {
"start": [
2016-12-13 02:26:26 +03:00
1,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
3,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Added a BEGIN block"
2016-12-13 00:41:55 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"begin-block.rb"
],
"patch": [
"diff --git a/begin-block.rb b/begin-block.rb",
"index e69de29..689ee83 100644",
"--- a/begin-block.rb",
"+++ b/begin-block.rb",
"@@ -0,0 +1,3 @@",
"+BEGIN {",
"+ foo",
"+}"
],
"gitDir": "test/corpus/repos/ruby",
2017-01-26 04:27:46 +03:00
"shas": "13b54918666502353431828fabfae483e79016f6..ab95dd845e232d1b15d0a9159ba71ea967234cdd"
2016-12-13 00:41:55 +03:00
}
,{
"testCaseDescription": "ruby-begin-block-replacement-insert-test",
"expectedResult": {
"changes": {
"begin-block.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2016-12-13 02:26:26 +03:00
2,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
4,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Added a BEGIN block"
2016-12-13 00:41:55 +03:00
},
{
"span": {
"insert": {
"start": [
2016-12-13 02:26:26 +03:00
5,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
7,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Added a BEGIN block"
2016-12-13 00:41:55 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"begin-block.rb"
],
"patch": [
"diff --git a/begin-block.rb b/begin-block.rb",
"index 689ee83..6d35684 100644",
"--- a/begin-block.rb",
"+++ b/begin-block.rb",
"@@ -1,3 +1,10 @@",
"+foo",
"+BEGIN {",
"+ bar",
"+}",
"+BEGIN {",
"+ foo",
"+}",
" BEGIN {",
" foo",
" }"
],
"gitDir": "test/corpus/repos/ruby",
2017-01-26 04:27:46 +03:00
"shas": "ab95dd845e232d1b15d0a9159ba71ea967234cdd..768468aad577e2ca1c37ef0e85402e55c5df1e80"
2016-12-13 00:41:55 +03:00
}
,{
"testCaseDescription": "ruby-begin-block-delete-insert-test",
"expectedResult": {
"changes": {
"begin-block.rb": [
{
"span": {
"insert": {
"start": [
2016-12-13 02:26:26 +03:00
1,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
3,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Added a BEGIN block"
2016-12-13 00:41:55 +03:00
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2016-12-13 02:26:26 +03:00
2,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
4,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Deleted a BEGIN block"
2016-12-13 00:41:55 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"begin-block.rb"
],
"patch": [
"diff --git a/begin-block.rb b/begin-block.rb",
"index 6d35684..59f3ea8 100644",
"--- a/begin-block.rb",
"+++ b/begin-block.rb",
"@@ -1,6 +1,5 @@",
"-foo",
" BEGIN {",
"- bar",
"+ foo",
" }",
" BEGIN {",
" foo"
],
"gitDir": "test/corpus/repos/ruby",
2017-01-26 04:27:46 +03:00
"shas": "768468aad577e2ca1c37ef0e85402e55c5df1e80..dd09bb810f4aaf44d62808213d5e82a4e193ee1c"
2016-12-13 00:41:55 +03:00
}
,{
"testCaseDescription": "ruby-begin-block-replacement-test",
"expectedResult": {
"changes": {
"begin-block.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
2
],
"end": [
2,
5
]
},
{
"start": [
3,
2
],
"end": [
3,
5
]
}
]
},
2016-12-13 02:26:26 +03:00
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in a BEGIN block"
2016-12-13 00:41:55 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"begin-block.rb"
],
"patch": [
"diff --git a/begin-block.rb b/begin-block.rb",
"index 59f3ea8..6d35684 100644",
"--- a/begin-block.rb",
"+++ b/begin-block.rb",
"@@ -1,5 +1,6 @@",
"+foo",
" BEGIN {",
"- foo",
"+ bar",
" }",
" BEGIN {",
" foo"
],
"gitDir": "test/corpus/repos/ruby",
2017-01-26 04:27:46 +03:00
"shas": "dd09bb810f4aaf44d62808213d5e82a4e193ee1c..8fcb3cb05329b9961aa6fd2080e4220cb1a6f2c4"
2016-12-13 00:41:55 +03:00
}
,{
"testCaseDescription": "ruby-begin-block-delete-replacement-test",
"expectedResult": {
"changes": {
"begin-block.rb": [
{
"span": {
"delete": {
"start": [
2016-12-13 02:26:26 +03:00
8,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
10,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Deleted a BEGIN block"
2016-12-13 00:41:55 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"begin-block.rb"
],
"patch": [
"diff --git a/begin-block.rb b/begin-block.rb",
"index 6d35684..422d4eb 100644",
"--- a/begin-block.rb",
"+++ b/begin-block.rb",
"@@ -1,10 +1,7 @@",
"-foo",
"-BEGIN {",
"- bar",
"-}",
" BEGIN {",
" foo",
" }",
"+foo",
" BEGIN {",
"- foo",
"+ bar",
" }"
],
"gitDir": "test/corpus/repos/ruby",
2017-01-26 04:27:46 +03:00
"shas": "8fcb3cb05329b9961aa6fd2080e4220cb1a6f2c4..e45ce4f47febb1c4536cb1e67b0e77e2601fac8d"
2016-12-13 00:41:55 +03:00
}
,{
"testCaseDescription": "ruby-begin-block-delete-test",
"expectedResult": {
"changes": {
"begin-block.rb": [
{
"span": {
"delete": {
"start": [
2016-12-13 02:26:26 +03:00
1,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
3,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Deleted a BEGIN block"
2016-12-13 00:41:55 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"begin-block.rb"
],
"patch": [
"diff --git a/begin-block.rb b/begin-block.rb",
"index 422d4eb..a936ce1 100644",
"--- a/begin-block.rb",
"+++ b/begin-block.rb",
"@@ -1,6 +1,3 @@",
"-BEGIN {",
"- foo",
"-}",
" foo",
" BEGIN {",
" bar"
],
"gitDir": "test/corpus/repos/ruby",
2017-01-26 04:27:46 +03:00
"shas": "e45ce4f47febb1c4536cb1e67b0e77e2601fac8d..14f3d6830d0de89b6d473bdfb743645a794b25e3"
2016-12-13 00:41:55 +03:00
}
,{
"testCaseDescription": "ruby-begin-block-delete-rest-test",
"expectedResult": {
"changes": {
"begin-block.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2016-12-13 02:26:26 +03:00
2,
1
2016-12-13 00:41:55 +03:00
],
"end": [
2016-12-13 02:26:26 +03:00
4,
2
2016-12-13 00:41:55 +03:00
]
}
},
2016-12-13 02:26:26 +03:00
"summary": "Deleted a BEGIN block"
2016-12-13 00:41:55 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"begin-block.rb"
],
"patch": [
"diff --git a/begin-block.rb b/begin-block.rb",
"index a936ce1..e69de29 100644",
"--- a/begin-block.rb",
"+++ b/begin-block.rb",
"@@ -1,4 +0,0 @@",
"-foo",
"-BEGIN {",
"- bar",
"-}"
],
"gitDir": "test/corpus/repos/ruby",
2017-01-26 04:27:46 +03:00
"shas": "14f3d6830d0de89b6d473bdfb743645a794b25e3..51638d239b4fc813f309e3143df19945f9134fc9"
2016-12-13 00:41:55 +03:00
}]