mirror of
https://github.com/github/semantic.git
synced 2024-12-24 07:25:44 +03:00
529 lines
15 KiB
JSON
529 lines
15 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-if-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.rb b/if.rb",
|
|
"index e69de29..c4c729f 100644",
|
|
"--- a/if.rb",
|
|
"+++ b/if.rb",
|
|
"@@ -0,0 +1,7 @@",
|
|
"+if foo",
|
|
"+ bar",
|
|
"+elsif quux",
|
|
"+ baz",
|
|
"+else",
|
|
"+ bat",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "51729c359e350d71395532126c23bfed960f2373..eb8e4745aa2692c20519254d7b8d27b3a2c07cac"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-if-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
11,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.rb b/if.rb",
|
|
"index c4c729f..326833f 100644",
|
|
"--- a/if.rb",
|
|
"+++ b/if.rb",
|
|
"@@ -1,3 +1,14 @@",
|
|
"+if x",
|
|
"+end",
|
|
"+if y then",
|
|
"+end",
|
|
"+if foo",
|
|
"+ bar",
|
|
"+elsif quux",
|
|
"+ baz",
|
|
"+else",
|
|
"+ bat",
|
|
"+end",
|
|
" if foo",
|
|
" bar",
|
|
" elsif quux"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "eb8e4745aa2692c20519254d7b8d27b3a2c07cac..a0d707f1e50df11d0aa4d3407dfcf79fad65acc6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-if-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'foo' identifier in the 'foo' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar' identifier in the 'foo' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'quux' elsif block in the 'foo' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
3
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bat' identifier in the 'foo' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.rb b/if.rb",
|
|
"index 326833f..2cbbfda 100644",
|
|
"--- a/if.rb",
|
|
"+++ b/if.rb",
|
|
"@@ -1,6 +1,9 @@",
|
|
"-if x",
|
|
"-end",
|
|
"-if y then",
|
|
"+if foo",
|
|
"+ bar",
|
|
"+elsif quux",
|
|
"+ baz",
|
|
"+else",
|
|
"+ bat",
|
|
" end",
|
|
" if foo",
|
|
" bar"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "a0d707f1e50df11d0aa4d3407dfcf79fad65acc6..b9ef26ef27b3cf5ad0e522a145ede60f9b4f3dc2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-if-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' identifier with the 'x' identifier in the 'x' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar' identifier in the 'x' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'quux' elsif block in the 'x' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
3
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bat' identifier in the 'x' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.rb b/if.rb",
|
|
"index 2cbbfda..326833f 100644",
|
|
"--- a/if.rb",
|
|
"+++ b/if.rb",
|
|
"@@ -1,9 +1,6 @@",
|
|
"-if foo",
|
|
"- bar",
|
|
"-elsif quux",
|
|
"- baz",
|
|
"-else",
|
|
"- bat",
|
|
"+if x",
|
|
"+end",
|
|
"+if y then",
|
|
" end",
|
|
" if foo",
|
|
" bar"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "b9ef26ef27b3cf5ad0e522a145ede60f9b4f3dc2..af72ae7656106dce11ffcbd6c2a31e9a756b0342"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-if-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
18,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.rb b/if.rb",
|
|
"index 326833f..2927cc0 100644",
|
|
"--- a/if.rb",
|
|
"+++ b/if.rb",
|
|
"@@ -1,7 +1,3 @@",
|
|
"-if x",
|
|
"-end",
|
|
"-if y then",
|
|
"-end",
|
|
" if foo",
|
|
" bar",
|
|
" elsif quux",
|
|
"@@ -9,10 +5,7 @@ elsif quux",
|
|
" else",
|
|
" bat",
|
|
" end",
|
|
"-if foo",
|
|
"- bar",
|
|
"-elsif quux",
|
|
"- baz",
|
|
"-else",
|
|
"- bat",
|
|
"+if x",
|
|
"+end",
|
|
"+if y then",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "af72ae7656106dce11ffcbd6c2a31e9a756b0342..2aef901d538d790e42fec0a2a6b1522d8b4fce9e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-if-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.rb b/if.rb",
|
|
"index 2927cc0..5bfb167 100644",
|
|
"--- a/if.rb",
|
|
"+++ b/if.rb",
|
|
"@@ -1,10 +1,3 @@",
|
|
"-if foo",
|
|
"- bar",
|
|
"-elsif quux",
|
|
"- baz",
|
|
"-else",
|
|
"- bat",
|
|
"-end",
|
|
" if x",
|
|
" end",
|
|
" if y then"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "2aef901d538d790e42fec0a2a6b1522d8b4fce9e..bd1fd56e20054df058e8bc8d3e2dd0d523ecce08"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-if-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.rb b/if.rb",
|
|
"index 5bfb167..e69de29 100644",
|
|
"--- a/if.rb",
|
|
"+++ b/if.rb",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-if x",
|
|
"-end",
|
|
"-if y then",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "bd1fd56e20054df058e8bc8d3e2dd0d523ecce08..4fed48f0abf8058f93dbb4c7361358c434c9bb6d"
|
|
}]
|