1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/ruby/string.json
2017-01-10 16:58:40 -05:00

539 lines
16 KiB
JSON

[{
"testCaseDescription": "ruby-string-insert-test",
"expectedResult": {
"changes": {
"string.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
3
]
}
},
"summary": "Added the '' string"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
17
]
}
},
"summary": "Added the 'foo with \"bar\"' string"
}
]
},
"errors": {}
},
"filePaths": [
"string.rb"
],
"patch": [
"diff --git a/string.rb b/string.rb",
"index e69de29..8d1b50a 100644",
"--- a/string.rb",
"+++ b/string.rb",
"@@ -0,0 +1,2 @@",
"+''",
"+'foo with \"bar\"'"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "7ebd6827a5d7b82404ff6761e992212338120497..27fac5bcf8b0dbb842fe0802a569073fd3a195c9"
}
,{
"testCaseDescription": "ruby-string-replacement-insert-test",
"expectedResult": {
"changes": {
"string.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
3
]
}
},
"summary": "Added the \"\" string"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
17
]
}
},
"summary": "Added the \"bar with 'foo'\" string"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
3
]
}
},
"summary": "Added the '' string"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
17
]
}
},
"summary": "Added the 'foo with \"bar\"' string"
}
]
},
"errors": {}
},
"filePaths": [
"string.rb"
],
"patch": [
"diff --git a/string.rb b/string.rb",
"index 8d1b50a..f1597ee 100644",
"--- a/string.rb",
"+++ b/string.rb",
"@@ -1,2 +1,6 @@",
"+\"\"",
"+\"bar with 'foo'\"",
"+''",
"+'foo with \"bar\"'",
" ''",
" 'foo with \"bar\"'"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "27fac5bcf8b0dbb842fe0802a569073fd3a195c9..83fe55b26099066a31b51fb49e8fe3a8f90f7ffd"
}
,{
"testCaseDescription": "ruby-string-delete-insert-test",
"expectedResult": {
"changes": {
"string.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
3
]
},
{
"start": [
1,
1
],
"end": [
1,
3
]
}
]
},
"summary": "Replaced the \"\" string with the '' string"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
17
]
},
{
"start": [
2,
1
],
"end": [
2,
17
]
}
]
},
"summary": "Replaced the \"bar with 'foo'\" string with the 'foo with \"bar\"' string"
}
]
},
"errors": {}
},
"filePaths": [
"string.rb"
],
"patch": [
"diff --git a/string.rb b/string.rb",
"index f1597ee..6158c1a 100644",
"--- a/string.rb",
"+++ b/string.rb",
"@@ -1,5 +1,5 @@",
"-\"\"",
"-\"bar with 'foo'\"",
"+''",
"+'foo with \"bar\"'",
" ''",
" 'foo with \"bar\"'",
" ''"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "83fe55b26099066a31b51fb49e8fe3a8f90f7ffd..81b822bb101f7994fdba7d9f50ffe3fdd586a1de"
}
,{
"testCaseDescription": "ruby-string-replacement-test",
"expectedResult": {
"changes": {
"string.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
3
]
},
{
"start": [
1,
1
],
"end": [
1,
3
]
}
]
},
"summary": "Replaced the '' string with the \"\" string"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
17
]
},
{
"start": [
2,
1
],
"end": [
2,
17
]
}
]
},
"summary": "Replaced the 'foo with \"bar\"' string with the \"bar with 'foo'\" string"
}
]
},
"errors": {}
},
"filePaths": [
"string.rb"
],
"patch": [
"diff --git a/string.rb b/string.rb",
"index 6158c1a..f1597ee 100644",
"--- a/string.rb",
"+++ b/string.rb",
"@@ -1,5 +1,5 @@",
"-''",
"-'foo with \"bar\"'",
"+\"\"",
"+\"bar with 'foo'\"",
" ''",
" 'foo with \"bar\"'",
" ''"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "81b822bb101f7994fdba7d9f50ffe3fdd586a1de..6902188d1be1120e910283620c00286b51576c0d"
}
,{
"testCaseDescription": "ruby-string-delete-replacement-test",
"expectedResult": {
"changes": {
"string.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
3
]
}
},
"summary": "Deleted the \"\" string"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
17
]
}
},
"summary": "Deleted the \"bar with 'foo'\" string"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
3
]
}
},
"summary": "Deleted the '' string"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
17
]
}
},
"summary": "Deleted the 'foo with \"bar\"' string"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
3
]
}
},
"summary": "Added the \"\" string"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
17
]
}
},
"summary": "Added the \"bar with 'foo'\" string"
}
]
},
"errors": {}
},
"filePaths": [
"string.rb"
],
"patch": [
"diff --git a/string.rb b/string.rb",
"index f1597ee..b8be05c 100644",
"--- a/string.rb",
"+++ b/string.rb",
"@@ -1,6 +1,4 @@",
"-\"\"",
"-\"bar with 'foo'\"",
"-''",
"-'foo with \"bar\"'",
" ''",
" 'foo with \"bar\"'",
"+\"\"",
"+\"bar with 'foo'\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "6902188d1be1120e910283620c00286b51576c0d..252b39fe10fafd461f32c1134f394af989fe8bd8"
}
,{
"testCaseDescription": "ruby-string-delete-test",
"expectedResult": {
"changes": {
"string.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
3
]
}
},
"summary": "Deleted the '' string"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
17
]
}
},
"summary": "Deleted the 'foo with \"bar\"' string"
}
]
},
"errors": {}
},
"filePaths": [
"string.rb"
],
"patch": [
"diff --git a/string.rb b/string.rb",
"index b8be05c..83e4a68 100644",
"--- a/string.rb",
"+++ b/string.rb",
"@@ -1,4 +1,2 @@",
"-''",
"-'foo with \"bar\"'",
" \"\"",
" \"bar with 'foo'\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "252b39fe10fafd461f32c1134f394af989fe8bd8..805faaf2c6ddb9e46b814906f88be535de018833"
}
,{
"testCaseDescription": "ruby-string-delete-rest-test",
"expectedResult": {
"changes": {
"string.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
3
]
}
},
"summary": "Deleted the \"\" string"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
17
]
}
},
"summary": "Deleted the \"bar with 'foo'\" string"
}
]
},
"errors": {}
},
"filePaths": [
"string.rb"
],
"patch": [
"diff --git a/string.rb b/string.rb",
"index 83e4a68..e69de29 100644",
"--- a/string.rb",
"+++ b/string.rb",
"@@ -1,2 +0,0 @@",
"-\"\"",
"-\"bar with 'foo'\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "805faaf2c6ddb9e46b814906f88be535de018833..f01943ce6087b22d073b0ff424ad17ec604f2ced"
}]