mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +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": "a8b440ad76232e4e95f5a5ed53b9b6604ece8a17..4469095014f7bc3f2ba06bba93197b7113965a36"
|
|
}
|
|
,{
|
|
"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": "4469095014f7bc3f2ba06bba93197b7113965a36..49f95d96fcf4b3e1ddc5d64c6d19c1f1415aa21f"
|
|
}
|
|
,{
|
|
"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": "49f95d96fcf4b3e1ddc5d64c6d19c1f1415aa21f..69de797721bf90b5e163efddf6c21683973e91e5"
|
|
}
|
|
,{
|
|
"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": "69de797721bf90b5e163efddf6c21683973e91e5..c4dc260bbc97bb7f7c90d41a7ee7418e31529715"
|
|
}
|
|
,{
|
|
"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": "c4dc260bbc97bb7f7c90d41a7ee7418e31529715..941d12bbe9281602e9f778ef87716fa0cdc94f6c"
|
|
}
|
|
,{
|
|
"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": "941d12bbe9281602e9f778ef87716fa0cdc94f6c..79311ce946c9650610644371262924744f9acecc"
|
|
}
|
|
,{
|
|
"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": "79311ce946c9650610644371262924744f9acecc..6745758f03dc308eff3e95e8876445225bcdf49e"
|
|
}]
|