mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +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": "54b8896e3161e23f3cc38414d860e49c385d98ea..bf0c269b25a439dde0379686ee872b8ee1131636"
|
|
}
|
|
,{
|
|
"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": "bf0c269b25a439dde0379686ee872b8ee1131636..5644f2ba2009c5ec36ecf85536876ede951bcf97"
|
|
}
|
|
,{
|
|
"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": "5644f2ba2009c5ec36ecf85536876ede951bcf97..9c21efca119534d9cfc40651a91e427ea3d84754"
|
|
}
|
|
,{
|
|
"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": "9c21efca119534d9cfc40651a91e427ea3d84754..610699faa6dc50b24bc691c72d95dd45a35d79ec"
|
|
}
|
|
,{
|
|
"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": "610699faa6dc50b24bc691c72d95dd45a35d79ec..7160921649a7890563e00272e08199d7d0b78bf4"
|
|
}
|
|
,{
|
|
"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": "7160921649a7890563e00272e08199d7d0b78bf4..5fba852ca0df591631002d4d49e810686949681b"
|
|
}
|
|
,{
|
|
"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": "5fba852ca0df591631002d4d49e810686949681b..59e2edbe041b887605acb7a535fcceacb50d82a3"
|
|
}]
|