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/for.json
2017-01-10 16:58:40 -05:00

375 lines
10 KiB
JSON

[{
"testCaseDescription": "ruby-for-insert-test",
"expectedResult": {
"changes": {
"for.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'x in y' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for.rb"
],
"patch": [
"diff --git a/for.rb b/for.rb",
"index e69de29..e4ea259 100644",
"--- a/for.rb",
"+++ b/for.rb",
"@@ -0,0 +1,3 @@",
"+for x in y",
"+ f",
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0eaabcf2392e93b57c829821f8bf710420e41daa..e356d6c08968613a8dd3e38a6cb0a3433e0d3f08"
}
,{
"testCaseDescription": "ruby-for-replacement-insert-test",
"expectedResult": {
"changes": {
"for.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'i in [1,2,3]' for statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
6,
4
]
}
},
"summary": "Added the 'x in y' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for.rb"
],
"patch": [
"diff --git a/for.rb b/for.rb",
"index e4ea259..1ec5fb3 100644",
"--- a/for.rb",
"+++ b/for.rb",
"@@ -1,3 +1,9 @@",
"+for i in [1,2,3] do",
"+ print i",
"+end",
"+for x in y",
"+ f",
"+end",
" for x in y",
" f",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e356d6c08968613a8dd3e38a6cb0a3433e0d3f08..adaefcb0991e27ae887c276344c9523c0cee9510"
}
,{
"testCaseDescription": "ruby-for-delete-insert-test",
"expectedResult": {
"changes": {
"for.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
3,
4
]
},
{
"start": [
1,
1
],
"end": [
3,
4
]
}
]
},
"summary": "Replaced the 'i in [1,2,3]' for statement with the 'x in y' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for.rb"
],
"patch": [
"diff --git a/for.rb b/for.rb",
"index 1ec5fb3..b6b5bdd 100644",
"--- a/for.rb",
"+++ b/for.rb",
"@@ -1,5 +1,5 @@",
"-for i in [1,2,3] do",
"- print i",
"+for x in y",
"+ f",
" end",
" for x in y",
" f"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "adaefcb0991e27ae887c276344c9523c0cee9510..0131c4d51e598c0554e1a26f4284ba0e51774eeb"
}
,{
"testCaseDescription": "ruby-for-replacement-test",
"expectedResult": {
"changes": {
"for.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
3,
4
]
},
{
"start": [
1,
1
],
"end": [
3,
4
]
}
]
},
"summary": "Replaced the 'x in y' for statement with the 'i in [1,2,3]' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for.rb"
],
"patch": [
"diff --git a/for.rb b/for.rb",
"index b6b5bdd..1ec5fb3 100644",
"--- a/for.rb",
"+++ b/for.rb",
"@@ -1,5 +1,5 @@",
"-for x in y",
"- f",
"+for i in [1,2,3] do",
"+ print i",
" end",
" for x in y",
" f"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0131c4d51e598c0554e1a26f4284ba0e51774eeb..64274fd39d37c0e350f8b5b2a6e27b78e3a25fe1"
}
,{
"testCaseDescription": "ruby-for-delete-replacement-test",
"expectedResult": {
"changes": {
"for.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'i in [1,2,3]' for statement"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
6,
4
]
}
},
"summary": "Deleted the 'x in y' for statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
6,
4
]
}
},
"summary": "Added the 'i in [1,2,3]' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for.rb"
],
"patch": [
"diff --git a/for.rb b/for.rb",
"index 1ec5fb3..543a0c8 100644",
"--- a/for.rb",
"+++ b/for.rb",
"@@ -1,9 +1,6 @@",
"-for i in [1,2,3] do",
"- print i",
"-end",
" for x in y",
" f",
" end",
"-for x in y",
"- f",
"+for i in [1,2,3] do",
"+ print i",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "64274fd39d37c0e350f8b5b2a6e27b78e3a25fe1..284f4b8c80f7e2556863803792ce6b3613223505"
}
,{
"testCaseDescription": "ruby-for-delete-test",
"expectedResult": {
"changes": {
"for.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'x in y' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for.rb"
],
"patch": [
"diff --git a/for.rb b/for.rb",
"index 543a0c8..9031ee4 100644",
"--- a/for.rb",
"+++ b/for.rb",
"@@ -1,6 +1,3 @@",
"-for x in y",
"- f",
"-end",
" for i in [1,2,3] do",
" print i",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "284f4b8c80f7e2556863803792ce6b3613223505..f03a5929f5dcca6748b1fa7dce31d93003c0a00f"
}
,{
"testCaseDescription": "ruby-for-delete-rest-test",
"expectedResult": {
"changes": {
"for.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'i in [1,2,3]' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for.rb"
],
"patch": [
"diff --git a/for.rb b/for.rb",
"index 9031ee4..e69de29 100644",
"--- a/for.rb",
"+++ b/for.rb",
"@@ -1,3 +0,0 @@",
"-for i in [1,2,3] do",
"- print i",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f03a5929f5dcca6748b1fa7dce31d93003c0a00f..878d73eafb26130f38c5639bd8adec528a5a2299"
}]