mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +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": "5063a6e97353e552c8a9a38f3cf69ef68790c3ab..e420b9e6d9f4c570e7ab4a005d6d445b311ead38"
|
|
}
|
|
,{
|
|
"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": "e420b9e6d9f4c570e7ab4a005d6d445b311ead38..0fef26f562072aea7fb0f874d7552324daff2f4f"
|
|
}
|
|
,{
|
|
"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": "0fef26f562072aea7fb0f874d7552324daff2f4f..b6740a1b1e5dcaf4f5401b301bfd5a2b11638b67"
|
|
}
|
|
,{
|
|
"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": "b6740a1b1e5dcaf4f5401b301bfd5a2b11638b67..82e24cd9a151e25fc034c9e58d5737ac2f306a21"
|
|
}
|
|
,{
|
|
"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": "82e24cd9a151e25fc034c9e58d5737ac2f306a21..f29d1cd33117f62aa71f4b04b2c065e42c7e0a9f"
|
|
}
|
|
,{
|
|
"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": "f29d1cd33117f62aa71f4b04b2c065e42c7e0a9f..7c8b899f33252e7a9207a2d200e41b48a1d6e823"
|
|
}
|
|
,{
|
|
"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": "7c8b899f33252e7a9207a2d200e41b48a1d6e823..7882bb5b3e1cea5c33c4c86cf4a7935c534cf40c"
|
|
}]
|