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/interpolation.json
2017-02-06 10:44:04 -05:00

539 lines
17 KiB
JSON

[{
"testCaseDescription": "ruby-interpolation-insert-test",
"expectedResult": {
"changes": {
"interpolation.rb": [
{
"span": {
"insert": {
"start": [
1,
9
],
"end": [
1,
12
]
}
},
"summary": "Added the 'bar' identifier"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
11
]
}
},
"summary": "Added the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"interpolation.rb"
],
"patch": [
"diff --git a/interpolation.rb b/interpolation.rb",
"index e69de29..a37ad45 100644",
"--- a/interpolation.rb",
"+++ b/interpolation.rb",
"@@ -0,0 +1,2 @@",
"+:\"foo #{bar}\"",
"+\"foo #{bar}\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "57121851289086218aea914888bd04b3ab064716..c2ba702430f25eb241e30acdb7764fd422b1d989"
}
,{
"testCaseDescription": "ruby-interpolation-replacement-insert-test",
"expectedResult": {
"changes": {
"interpolation.rb": [
{
"span": {
"insert": {
"start": [
1,
9
],
"end": [
1,
12
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
11
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
3,
9
],
"end": [
3,
12
]
}
},
"summary": "Added the 'bar' identifier"
},
{
"span": {
"insert": {
"start": [
4,
8
],
"end": [
4,
11
]
}
},
"summary": "Added the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"interpolation.rb"
],
"patch": [
"diff --git a/interpolation.rb b/interpolation.rb",
"index a37ad45..c024bd6 100644",
"--- a/interpolation.rb",
"+++ b/interpolation.rb",
"@@ -1,2 +1,6 @@",
"+:\"bar #{foo}\"",
"+\"bar #{foo}\"",
"+:\"foo #{bar}\"",
"+\"foo #{bar}\"",
" :\"foo #{bar}\"",
" \"foo #{bar}\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "c2ba702430f25eb241e30acdb7764fd422b1d989..35bd1657e6377602413f3395baf5d1b37ff29d8b"
}
,{
"testCaseDescription": "ruby-interpolation-delete-insert-test",
"expectedResult": {
"changes": {
"interpolation.rb": [
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
12
]
},
{
"start": [
1,
9
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'bar' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
8
],
"end": [
2,
11
]
},
{
"start": [
2,
8
],
"end": [
2,
11
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"interpolation.rb"
],
"patch": [
"diff --git a/interpolation.rb b/interpolation.rb",
"index c024bd6..ce70dd5 100644",
"--- a/interpolation.rb",
"+++ b/interpolation.rb",
"@@ -1,5 +1,5 @@",
"-:\"bar #{foo}\"",
"-\"bar #{foo}\"",
"+:\"foo #{bar}\"",
"+\"foo #{bar}\"",
" :\"foo #{bar}\"",
" \"foo #{bar}\"",
" :\"foo #{bar}\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "35bd1657e6377602413f3395baf5d1b37ff29d8b..1705098a82f575d1fd258aee6710726310dcae97"
}
,{
"testCaseDescription": "ruby-interpolation-replacement-test",
"expectedResult": {
"changes": {
"interpolation.rb": [
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
12
]
},
{
"start": [
1,
9
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced the 'bar' identifier with the 'foo' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
8
],
"end": [
2,
11
]
},
{
"start": [
2,
8
],
"end": [
2,
11
]
}
]
},
"summary": "Replaced the 'bar' identifier with the 'foo' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"interpolation.rb"
],
"patch": [
"diff --git a/interpolation.rb b/interpolation.rb",
"index ce70dd5..c024bd6 100644",
"--- a/interpolation.rb",
"+++ b/interpolation.rb",
"@@ -1,5 +1,5 @@",
"-:\"foo #{bar}\"",
"-\"foo #{bar}\"",
"+:\"bar #{foo}\"",
"+\"bar #{foo}\"",
" :\"foo #{bar}\"",
" \"foo #{bar}\"",
" :\"foo #{bar}\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "1705098a82f575d1fd258aee6710726310dcae97..6771369e5922cd7d1386b5b4aab61ef734b9a1f9"
}
,{
"testCaseDescription": "ruby-interpolation-delete-replacement-test",
"expectedResult": {
"changes": {
"interpolation.rb": [
{
"span": {
"delete": {
"start": [
1,
9
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2,
8
],
"end": [
2,
11
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
3,
9
],
"end": [
3,
12
]
}
},
"summary": "Deleted the 'bar' identifier"
},
{
"span": {
"delete": {
"start": [
4,
8
],
"end": [
4,
11
]
}
},
"summary": "Deleted the 'bar' identifier"
},
{
"span": {
"insert": {
"start": [
3,
9
],
"end": [
3,
12
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
4,
8
],
"end": [
4,
11
]
}
},
"summary": "Added the 'foo' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"interpolation.rb"
],
"patch": [
"diff --git a/interpolation.rb b/interpolation.rb",
"index c024bd6..f56366a 100644",
"--- a/interpolation.rb",
"+++ b/interpolation.rb",
"@@ -1,6 +1,4 @@",
"-:\"bar #{foo}\"",
"-\"bar #{foo}\"",
"-:\"foo #{bar}\"",
"-\"foo #{bar}\"",
" :\"foo #{bar}\"",
" \"foo #{bar}\"",
"+:\"bar #{foo}\"",
"+\"bar #{foo}\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "6771369e5922cd7d1386b5b4aab61ef734b9a1f9..768d0209feac8bb2cbcca835fca75a6cd0d0e732"
}
,{
"testCaseDescription": "ruby-interpolation-delete-test",
"expectedResult": {
"changes": {
"interpolation.rb": [
{
"span": {
"delete": {
"start": [
1,
9
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'bar' identifier"
},
{
"span": {
"delete": {
"start": [
2,
8
],
"end": [
2,
11
]
}
},
"summary": "Deleted the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"interpolation.rb"
],
"patch": [
"diff --git a/interpolation.rb b/interpolation.rb",
"index f56366a..9b7bb17 100644",
"--- a/interpolation.rb",
"+++ b/interpolation.rb",
"@@ -1,4 +1,2 @@",
"-:\"foo #{bar}\"",
"-\"foo #{bar}\"",
" :\"bar #{foo}\"",
" \"bar #{foo}\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "768d0209feac8bb2cbcca835fca75a6cd0d0e732..d5cb9abbeac42729ad4a83f7ff4581fa83171528"
}
,{
"testCaseDescription": "ruby-interpolation-delete-rest-test",
"expectedResult": {
"changes": {
"interpolation.rb": [
{
"span": {
"delete": {
"start": [
1,
9
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2,
8
],
"end": [
2,
11
]
}
},
"summary": "Deleted the 'foo' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"interpolation.rb"
],
"patch": [
"diff --git a/interpolation.rb b/interpolation.rb",
"index 9b7bb17..e69de29 100644",
"--- a/interpolation.rb",
"+++ b/interpolation.rb",
"@@ -1,2 +0,0 @@",
"-:\"bar #{foo}\"",
"-\"bar #{foo}\""
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d5cb9abbeac42729ad4a83f7ff4581fa83171528..370c0a6d0e774ad3b0d66bf1c3a960572964e039"
}]