mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
728 lines
22 KiB
JSON
728 lines
22 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-symbol-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"symbol.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':foo' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':'foo'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':\"foo\"' symbol"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"symbol.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/symbol.rb b/symbol.rb",
|
|
"index e69de29..faa7b3e 100644",
|
|
"--- a/symbol.rb",
|
|
"+++ b/symbol.rb",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+:foo",
|
|
"+:'foo'",
|
|
"+:\"foo\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "822b3d7581f607f8943e2f9d69bd1f4bae4cbd5d..737241f3a6c1969196c255cd68c16b22741294d7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-symbol-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"symbol.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':bar' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':'bar'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':\"bar\"' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':foo' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':'foo'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':\"foo\"' symbol"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"symbol.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/symbol.rb b/symbol.rb",
|
|
"index faa7b3e..c4e6184 100644",
|
|
"--- a/symbol.rb",
|
|
"+++ b/symbol.rb",
|
|
"@@ -1,3 +1,9 @@",
|
|
"+:bar",
|
|
"+:'bar'",
|
|
"+:\"bar\"",
|
|
"+:foo",
|
|
"+:'foo'",
|
|
"+:\"foo\"",
|
|
" :foo",
|
|
" :'foo'",
|
|
" :\"foo\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "737241f3a6c1969196c255cd68c16b22741294d7..6787cdc94ffbb04e3ef7ec05b069aa21f72f12d4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-symbol-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"symbol.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':bar' symbol with the ':foo' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':'bar'' symbol with the ':'foo'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':\"bar\"' symbol with the ':\"foo\"' symbol"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"symbol.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/symbol.rb b/symbol.rb",
|
|
"index c4e6184..04cec42 100644",
|
|
"--- a/symbol.rb",
|
|
"+++ b/symbol.rb",
|
|
"@@ -1,6 +1,6 @@",
|
|
"-:bar",
|
|
"-:'bar'",
|
|
"-:\"bar\"",
|
|
"+:foo",
|
|
"+:'foo'",
|
|
"+:\"foo\"",
|
|
" :foo",
|
|
" :'foo'",
|
|
" :\"foo\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "6787cdc94ffbb04e3ef7ec05b069aa21f72f12d4..77b7552a83221bc5e9fcb1332a832930b699c864"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-symbol-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"symbol.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':foo' symbol with the ':bar' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':'foo'' symbol with the ':'bar'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':\"foo\"' symbol with the ':\"bar\"' symbol"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"symbol.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/symbol.rb b/symbol.rb",
|
|
"index 04cec42..c4e6184 100644",
|
|
"--- a/symbol.rb",
|
|
"+++ b/symbol.rb",
|
|
"@@ -1,6 +1,6 @@",
|
|
"-:foo",
|
|
"-:'foo'",
|
|
"-:\"foo\"",
|
|
"+:bar",
|
|
"+:'bar'",
|
|
"+:\"bar\"",
|
|
" :foo",
|
|
" :'foo'",
|
|
" :\"foo\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "77b7552a83221bc5e9fcb1332a832930b699c864..2f9f2f71b92767d1fc8f7c87ed47b20d1789384f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-symbol-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"symbol.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':bar' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':'bar'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':\"bar\"' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':foo' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':'foo'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':\"foo\"' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':bar' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':'bar'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':\"bar\"' symbol"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"symbol.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/symbol.rb b/symbol.rb",
|
|
"index c4e6184..977ce1c 100644",
|
|
"--- a/symbol.rb",
|
|
"+++ b/symbol.rb",
|
|
"@@ -1,9 +1,6 @@",
|
|
"-:bar",
|
|
"-:'bar'",
|
|
"-:\"bar\"",
|
|
"-:foo",
|
|
"-:'foo'",
|
|
"-:\"foo\"",
|
|
" :foo",
|
|
" :'foo'",
|
|
" :\"foo\"",
|
|
"+:bar",
|
|
"+:'bar'",
|
|
"+:\"bar\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "2f9f2f71b92767d1fc8f7c87ed47b20d1789384f..b71cab68316642c5b3408ab84052d310e876d927"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-symbol-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"symbol.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':foo' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':'foo'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':\"foo\"' symbol"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"symbol.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/symbol.rb b/symbol.rb",
|
|
"index 977ce1c..2109e60 100644",
|
|
"--- a/symbol.rb",
|
|
"+++ b/symbol.rb",
|
|
"@@ -1,6 +1,3 @@",
|
|
"-:foo",
|
|
"-:'foo'",
|
|
"-:\"foo\"",
|
|
" :bar",
|
|
" :'bar'",
|
|
" :\"bar\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "b71cab68316642c5b3408ab84052d310e876d927..a22af9ab69cda71efda2f7ebc00005f684e42464"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-symbol-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"symbol.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':bar' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':'bar'' symbol"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':\"bar\"' symbol"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"symbol.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/symbol.rb b/symbol.rb",
|
|
"index 2109e60..e69de29 100644",
|
|
"--- a/symbol.rb",
|
|
"+++ b/symbol.rb",
|
|
"@@ -1,3 +0,0 @@",
|
|
"-:bar",
|
|
"-:'bar'",
|
|
"-:\"bar\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "a22af9ab69cda71efda2f7ebc00005f684e42464..7ebd6827a5d7b82404ff6761e992212338120497"
|
|
}]
|