mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Fix up ruby integration tests
This commit is contained in:
parent
638163f203
commit
262d6ead40
@ -117,7 +117,9 @@ categoryForRubyName = \case
|
||||
"false" -> Boolean
|
||||
"float" -> NumberLiteral
|
||||
"for" -> For
|
||||
"formal_parameters" -> Params
|
||||
"method_parameters" -> Params
|
||||
"lambda_parameters" -> Params
|
||||
"block_parameters" -> Params
|
||||
"hash_splat_parameter" -> HashSplatParameter
|
||||
"hash" -> Object
|
||||
"identifier" -> Identifier
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -51,8 +51,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
4,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -93,8 +93,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
4,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -157,8 +157,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
4,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -200,8 +200,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
4,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -35,7 +35,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "5458878541d4dbd326730893f8986cee3285d576..b73bf47832991c4a3399b47b1d27c657d861e609"
|
||||
"shas": "52a29dd44dc7f27db3f3279b39b4eae4d3ba98cb..ec0f0b058d56b9299fe3a429027d66082a797fc4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-required-keyword-param-replacement-insert-test",
|
||||
@ -93,7 +93,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b73bf47832991c4a3399b47b1d27c657d861e609..60fa8a2728763fdb9d2ffa8aa56bbfd2f6967f0b"
|
||||
"shas": "ec0f0b058d56b9299fe3a429027d66082a797fc4..f05fd9e0c9db3a9978f1bd1998905e2b11f3174b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-required-keyword-param-delete-insert-test",
|
||||
@ -135,7 +135,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "60fa8a2728763fdb9d2ffa8aa56bbfd2f6967f0b..9646f88e1303a125db3c184abcc3a915db7779e5"
|
||||
"shas": "f05fd9e0c9db3a9978f1bd1998905e2b11f3174b..4c5b0ee021a2ceb825b4dbeb32f6d1fd14a2edc7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-required-keyword-param-replacement-test",
|
||||
@ -177,7 +177,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9646f88e1303a125db3c184abcc3a915db7779e5..9ce0060c2587e67bfc9ff2e9716b9cb56e1eb09c"
|
||||
"shas": "4c5b0ee021a2ceb825b4dbeb32f6d1fd14a2edc7..b5a1c874b43fae16b3cd23ba9729a0c406b255cc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-required-keyword-param-delete-replacement-test",
|
||||
@ -251,7 +251,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9ce0060c2587e67bfc9ff2e9716b9cb56e1eb09c..c5baaef18232cc643c8c8826e574d4c7842b2fd2"
|
||||
"shas": "b5a1c874b43fae16b3cd23ba9729a0c406b255cc..57ea4eeec323fe555cbf9c8fc28e5a1b59b58552"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-required-keyword-param-delete-test",
|
||||
@ -292,7 +292,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c5baaef18232cc643c8c8826e574d4c7842b2fd2..adbc1e83473b1f4efe5207aa66caaf2ee9549c5d"
|
||||
"shas": "57ea4eeec323fe555cbf9c8fc28e5a1b59b58552..c5e286928850b92f6e22d635402db88ce6041030"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-required-keyword-param-delete-rest-test",
|
||||
@ -331,5 +331,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "adbc1e83473b1f4efe5207aa66caaf2ee9549c5d..9feb37874cac5581ef001c084f185f8b5ff224ed"
|
||||
"shas": "c5e286928850b92f6e22d635402db88ce6041030..2564df555031825f37b8416fa96fa790ced587f1"
|
||||
}]
|
||||
|
@ -5,7 +5,7 @@
|
||||
"number.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
@ -16,11 +16,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1234'"
|
||||
"summary": "Deleted '1235'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
@ -31,11 +31,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1_234'"
|
||||
"summary": "Deleted '1_235'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
@ -46,11 +46,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '0d1_234'"
|
||||
"summary": "Deleted '0d1_235'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
@ -61,11 +61,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '0xa_bcd_ef0_123_456_789'"
|
||||
"summary": "Deleted '0xa_bcd_ef0_123_456_788'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
@ -76,11 +76,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '0o1234567'"
|
||||
"summary": "Deleted '0o1234576'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
@ -91,11 +91,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '0b1_0'"
|
||||
"summary": "Deleted '0b1_1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
@ -106,7 +106,112 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1.234_5e678_90'"
|
||||
"summary": "Deleted '1.234_5e678_91'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
9,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
9,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '1234'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
10,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '1_234'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
11,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
11,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '0d1_234'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
12,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '0xa_bcd_ef0_123_456_789'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
13,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
13,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '0o1234567'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
14,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
14,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '0b1_0'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
15,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
15,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '1.234_5e678_90'"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -117,21 +222,32 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/number.rb b/number.rb",
|
||||
"index e69de29..1a73a0e 100644",
|
||||
"index ed36c77..1a73a0e 100644",
|
||||
"--- a/number.rb",
|
||||
"+++ b/number.rb",
|
||||
"@@ -0,0 +1,8 @@",
|
||||
"+1234",
|
||||
"+1_234",
|
||||
"+0d1_234",
|
||||
"+0xa_bcd_ef0_123_456_789",
|
||||
"+0o1234567",
|
||||
"+0b1_0",
|
||||
"+1.234_5e678_90",
|
||||
"+"
|
||||
"@@ -1,19 +1,3 @@",
|
||||
"-1235",
|
||||
"-1_235",
|
||||
"-0d1_235",
|
||||
"-0xa_bcd_ef0_123_456_788",
|
||||
"-0o1234576",
|
||||
"-0b1_1",
|
||||
"-1.234_5e678_91",
|
||||
"-",
|
||||
"-1234",
|
||||
"-1_234",
|
||||
"-0d1_234",
|
||||
"-0xa_bcd_ef0_123_456_789",
|
||||
"-0o1234567",
|
||||
"-0b1_0",
|
||||
"-1.234_5e678_90",
|
||||
"-",
|
||||
" 1234",
|
||||
" 1_234",
|
||||
" 0d1_234"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3345b250a3b074d0b3725cfa9ada030ac0733c03..b35c0ae4461db11b6bc1c00ce53aced00ee35f9f"
|
||||
"shas": "bf43f06516c04aef2a1ce9e432bf0df8958101ed..50a7bb73b3463e2544743eb5dcf5179f6fee7291"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-number-replacement-insert-test",
|
||||
@ -247,7 +363,7 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
8,
|
||||
9,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
@ -256,7 +372,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '\n1234'"
|
||||
"summary": "Added '1234'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -290,30 +406,18 @@
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
12,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
24
|
||||
]
|
||||
}
|
||||
]
|
||||
"insert": {
|
||||
"start": [
|
||||
12,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Replaced '1234' with '0xa_bcd_ef0_123_456_789'"
|
||||
"summary": "Added '0xa_bcd_ef0_123_456_789'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -359,21 +463,6 @@
|
||||
}
|
||||
},
|
||||
"summary": "Added '1.234_5e678_90'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
16,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
17,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '\n1234'"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -409,7 +498,7 @@
|
||||
" 0d1_234"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b35c0ae4461db11b6bc1c00ce53aced00ee35f9f..722327896e7ef9a21676eca5e8eb6715e7401aa2"
|
||||
"shas": "50a7bb73b3463e2544743eb5dcf5179f6fee7291..aca5d08d02f79729a800d0b9c4e0c2663ae7ed87"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-number-delete-insert-test",
|
||||
@ -658,7 +747,7 @@
|
||||
" 1_234"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "722327896e7ef9a21676eca5e8eb6715e7401aa2..d544881fc9626b821f44434f08e418475cf152de"
|
||||
"shas": "aca5d08d02f79729a800d0b9c4e0c2663ae7ed87..5675d08708803436bed00ddfa1d2893260e3e2c8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-number-replacement-test",
|
||||
@ -907,28 +996,13 @@
|
||||
" 1_234"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d544881fc9626b821f44434f08e418475cf152de..67a6d066a1c1934842185072f8b4d14bed470dcd"
|
||||
"shas": "5675d08708803436bed00ddfa1d2893260e3e2c8..c007b52ad8b5f53a08d98dd3ed2921189030e735"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-number-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"number.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1234'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
@ -1038,7 +1112,7 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
8,
|
||||
9,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
@ -1047,7 +1121,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '\n1234'"
|
||||
"summary": "Deleted '1234'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -1139,26 +1213,11 @@
|
||||
},
|
||||
"summary": "Deleted '1.234_5e678_90'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
16,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
17,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '\n1234'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
8,
|
||||
9,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
@ -1167,7 +1226,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '\n1235'"
|
||||
"summary": "Added '1235'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -1304,28 +1363,13 @@
|
||||
" "
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "67a6d066a1c1934842185072f8b4d14bed470dcd..c4ebf6bf580826410bf6f43b1cddb603f489e60f"
|
||||
"shas": "c007b52ad8b5f53a08d98dd3ed2921189030e735..4620a50dba65807c26a68f11001e74bf9cfa3560"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-number-delete-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"number.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1235'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
@ -1430,21 +1474,6 @@
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '1.234_5e678_90'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
8,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
9,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '\n1235'"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1472,7 +1501,7 @@
|
||||
" 0d1_235"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c4ebf6bf580826410bf6f43b1cddb603f489e60f..2ff54d83dfd80eba661e8a5c4c7ed2b61d289e87"
|
||||
"shas": "4620a50dba65807c26a68f11001e74bf9cfa3560..e3453a3021a93a610510d6200f1e41600e7c1e45"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-number-delete-rest-test",
|
||||
@ -1607,5 +1636,5 @@
|
||||
"-"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "2ff54d83dfd80eba661e8a5c4c7ed2b61d289e87..5063a6e97353e552c8a9a38f3cf69ef68790c3ab"
|
||||
"shas": "e3453a3021a93a610510d6200f1e41600e7c1e45..89c097f9e80701ff5aadf5bc16bccefb1a2dd88f"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+/^(foo|bar[^_])$/i"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "72d6e4e549ce17f88e6130002ccc0ecd6302fdf2..c3d9695417e6678a456a6692f3f708f3578a9cf2"
|
||||
"shas": "d873b65ce39ee8f41bdbdb381d42fa08d4d6828b..a81497514efad14130af67a6c59da3e38a203338"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-regex-replacement-insert-test",
|
||||
@ -43,30 +43,48 @@
|
||||
"regex.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Replaced the '/^(foo|bar[^_])$/i' regex with '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1"
|
||||
"summary": "Added the '%r/a/' regex"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the '%r<a<b>c>' regex"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the '/^(foo|bar[^_])$/i' regex"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -87,7 +105,7 @@
|
||||
" /^(foo|bar[^_])$/i"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c3d9695417e6678a456a6692f3f708f3578a9cf2..390ab71fc475ff76aa74e63dc827efa8d620fd7c"
|
||||
"shas": "a81497514efad14130af67a6c59da3e38a203338..2c4bff251c3af7f257db7e04b537d243dfd50b3f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-regex-delete-insert-test",
|
||||
@ -103,8 +121,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
1
|
||||
1,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -119,7 +137,22 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1 with the '/^(foo|bar[^_])$/i' regex"
|
||||
"summary": "Replaced the '%r/a/' regex with the '/^(foo|bar[^_])$/i' regex"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the '%r<a<b>c>' regex"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -141,7 +174,7 @@
|
||||
" /^(foo|bar[^_])$/i"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "390ab71fc475ff76aa74e63dc827efa8d620fd7c..226f8b30f81ea0db57e79e1212adfc07130c6872"
|
||||
"shas": "2c4bff251c3af7f257db7e04b537d243dfd50b3f..202c9b305f328abb00348bf4fa60ddcaa685c98d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-regex-replacement-test",
|
||||
@ -167,13 +200,28 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
1
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '/^(foo|bar[^_])$/i' regex with '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1"
|
||||
"summary": "Replaced the '/^(foo|bar[^_])$/i' regex with the '%r/a/' regex"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the '%r<a<b>c>' regex"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -195,7 +243,7 @@
|
||||
" /^(foo|bar[^_])$/i"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "226f8b30f81ea0db57e79e1212adfc07130c6872..b8e98f854bb60e2823c562708c8ac5a4d4668d1e"
|
||||
"shas": "202c9b305f328abb00348bf4fa60ddcaa685c98d..76228a36df23d3d149aa5d30ba17ed62f5b05e46"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-regex-delete-replacement-test",
|
||||
@ -204,30 +252,18 @@
|
||||
"regex.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
19
|
||||
]
|
||||
}
|
||||
]
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Replaced '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1 with the '/^(foo|bar[^_])$/i' regex"
|
||||
"summary": "Deleted the '/^(foo|bar[^_])$/i' regex"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -249,7 +285,7 @@
|
||||
"-/^(foo|bar[^_])$/i"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b8e98f854bb60e2823c562708c8ac5a4d4668d1e..e9466dc38a6269d4defca09ae238272e8b593087"
|
||||
"shas": "76228a36df23d3d149aa5d30ba17ed62f5b05e46..bb8882a6f19767910795de2881377a431902ea2c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-regex-delete-test",
|
||||
@ -289,13 +325,28 @@
|
||||
" %r<a<b>c>"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e9466dc38a6269d4defca09ae238272e8b593087..5f3afced7715c5a7e7454ccf1817f4f3450def9f"
|
||||
"shas": "bb8882a6f19767910795de2881377a431902ea2c..9fc4528f1d251dfd14aff31ee7218848aacf54ec"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-regex-delete-rest-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"regex.rb": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the '%r/a/' regex"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
@ -313,25 +364,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {
|
||||
"regex.rb": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '%r/a/' at line 1, column 1 - line 1, column 6"
|
||||
}
|
||||
]
|
||||
}
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"regex.rb"
|
||||
@ -346,5 +379,5 @@
|
||||
"-%r<a<b>c>"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "5f3afced7715c5a7e7454ccf1817f4f3450def9f..38a4fc97908a2d22a188038b11a90fee2a3326eb"
|
||||
"shas": "9fc4528f1d251dfd14aff31ee7218848aacf54ec..c8a25ca0d6f2394e96b96d759ea4c21d2a5a12f7"
|
||||
}]
|
||||
|
@ -52,8 +52,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
5,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -95,8 +95,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
5,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -159,8 +159,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
5,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -202,8 +202,8 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
5,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -44,18 +44,7 @@
|
||||
"when.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
@ -65,9 +54,8 @@
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced 'case foo\nend\n' at line 1, column 1 - line 3, column 1 with the 'foo' case statement"
|
||||
"summary": "Added the 'foo' case statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -178,30 +166,18 @@
|
||||
"when.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Replaced the 'foo' case statement with 'case foo\nend\n' at line 1, column 1 - line 3, column 1"
|
||||
"summary": "Deleted the 'foo' case statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d873b65ce39ee8f41bdbdb381d42fa08d4d6828b
|
||||
Subproject commit 40ddeab1794ffd56578b63bcea8a678e08f5ece8
|
Loading…
Reference in New Issue
Block a user