1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/ruby/for.json
2017-01-25 20:27:46 -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": "9c0ac9c6243961b3f6c64e710fd4bd132ba6f0dc..f89a506947978546282fdfae72888a119bf8dc3e"
}
,{
"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": "f89a506947978546282fdfae72888a119bf8dc3e..cd9a6e76ae555bb85ebfb2cc227116879bd8aae4"
}
,{
"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": "cd9a6e76ae555bb85ebfb2cc227116879bd8aae4..b29e68979fed249b02784d214347435c79b9440e"
}
,{
"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": "b29e68979fed249b02784d214347435c79b9440e..83412ba9f1aa52c29dc6e682a51a0094f2949f29"
}
,{
"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": "83412ba9f1aa52c29dc6e682a51a0094f2949f29..fd5b26f34f8f9fc0d2eaf5784e0cb0f17ae5f2cd"
}
,{
"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": "fd5b26f34f8f9fc0d2eaf5784e0cb0f17ae5f2cd..d25dde1929afc434f56ea3e39a9b22596c2840d4"
}
,{
"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": "d25dde1929afc434f56ea3e39a9b22596c2840d4..16867ccacb6652a837e04e836ec69aaba1a2c63e"
}]