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
2016-11-03 16:02:56 -07: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": "2505617f30ca311da1378227cbf6a13d83647b91..ba6045bb44bd3872e04f0e0c67e330b73429defa"
}
,{
"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": "ba6045bb44bd3872e04f0e0c67e330b73429defa..9eab77466f1fc1d8a2ceaed51eab7b16159d2c4c"
}
,{
"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": "9eab77466f1fc1d8a2ceaed51eab7b16159d2c4c..c23529986ecc8afd8cc26b6e54dc68f203488cd0"
}
,{
"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": "c23529986ecc8afd8cc26b6e54dc68f203488cd0..477f525a5dd8fecc22f1eaaa4e77419e0255d2a9"
}
,{
"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": "477f525a5dd8fecc22f1eaaa4e77419e0255d2a9..c84f76f558cce919ec1935a75ad1b830b4511ff8"
}
,{
"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": "c84f76f558cce919ec1935a75ad1b830b4511ff8..cf1a6e3114fde76b4c1d6ad65ac4c2c10f3a2b3a"
}
,{
"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": "cf1a6e3114fde76b4c1d6ad65ac4c2c10f3a2b3a..ef8d34476c23317120bf744df9d41b9110a04c03"
}]