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/interpolation.json
2017-01-10 16:58:40 -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": "f01943ce6087b22d073b0ff424ad17ec604f2ced..cba8854a16244f83097ce40190a98fc461332f7f"
}
,{
"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": "cba8854a16244f83097ce40190a98fc461332f7f..8eabf31b2701507d41d6b99aa21da91ee73bb3b3"
}
,{
"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": "8eabf31b2701507d41d6b99aa21da91ee73bb3b3..56d74adda4f0562d97a8c424bc81c1a0fb8593a0"
}
,{
"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": "56d74adda4f0562d97a8c424bc81c1a0fb8593a0..1ac2f61b10ac53881c69214c3c844a705dfc4d27"
}
,{
"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": "1ac2f61b10ac53881c69214c3c844a705dfc4d27..7d3b3bf2b935a60a944a5e06de79d019fe74270e"
}
,{
"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": "7d3b3bf2b935a60a944a5e06de79d019fe74270e..b97b9cc95932e892e15d3933a663c760f3277f99"
}
,{
"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": "b97b9cc95932e892e15d3933a663c760f3277f99..33cf7a9ec3ab9b4b809f45b48c434118b1c07bd3"
}]