mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
499 lines
14 KiB
JSON
499 lines
14 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": "016efbbed35a70176cf3ec8bb08369cf7889c2e7..e64394684b86a0aa1426479d973d5fa65115c6d8"
|
|
}
|
|
,{
|
|
"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": "e64394684b86a0aa1426479d973d5fa65115c6d8..3b952dad00efbf05e77af42fc337786d53c25ab0"
|
|
}
|
|
,{
|
|
"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": [
|
|
7,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'quux' elsif block 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": "3b952dad00efbf05e77af42fc337786d53c25ab0..ecebede079885b31f55ce79cbe6a919b20618dd1"
|
|
}
|
|
,{
|
|
"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": [
|
|
7,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'quux' elsif block 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": "ecebede079885b31f55ce79cbe6a919b20618dd1..f34e4ac45eb68b1d48fe4e19559c716b1ae9765a"
|
|
}
|
|
,{
|
|
"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": "f34e4ac45eb68b1d48fe4e19559c716b1ae9765a..975011a6b4d433e9c281ccc29d9482c5aeca618c"
|
|
}
|
|
,{
|
|
"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": "975011a6b4d433e9c281ccc29d9482c5aeca618c..e01119c665cbc563d41d8cd9492f8a2d7f04c15a"
|
|
}
|
|
,{
|
|
"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": "e01119c665cbc563d41d8cd9492f8a2d7f04c15a..4b3dda74358a83438349bc50dc9bb75e6d632e6a"
|
|
}]
|