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": "9a18b4c80b2e7e2bdca5da3ea6388d1cb4727f8f..09e135965f850e6105dc12cbc31fbd33680c95cd"
|
|
}
|
|
,{
|
|
"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": "09e135965f850e6105dc12cbc31fbd33680c95cd..7a39278a9e93352f00f7dfa6362470078b3c27c9"
|
|
}
|
|
,{
|
|
"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"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'quux' elsif block"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an else block"
|
|
},
|
|
{
|
|
"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": "7a39278a9e93352f00f7dfa6362470078b3c27c9..cbf9441cd701880ffb2ae337601fdef3fd69de61"
|
|
}
|
|
,{
|
|
"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"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'quux' elsif block"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an else block"
|
|
},
|
|
{
|
|
"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": "cbf9441cd701880ffb2ae337601fdef3fd69de61..9af355b039a2d55b9201d78ff8f99773fb085b5b"
|
|
}
|
|
,{
|
|
"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": "9af355b039a2d55b9201d78ff8f99773fb085b5b..0b742b0999af15895c1470c7f6dbafde5168f693"
|
|
}
|
|
,{
|
|
"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": "0b742b0999af15895c1470c7f6dbafde5168f693..8c45366900e95149ad6489d3f46b949c8159f5bd"
|
|
}
|
|
,{
|
|
"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": "8c45366900e95149ad6489d3f46b949c8159f5bd..8faf69d7a7d6454f74fea1b6ecf0dae989609b0c"
|
|
}]
|