mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
1516 lines
46 KiB
JSON
1516 lines
46 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-number-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"number.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0d1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0xa_bcd_ef0_123_456_789'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0o1234567'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0b1_0'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1.234_5e678_90'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"number.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/number.rb b/number.rb",
|
|
"index e69de29..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",
|
|
"+"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "0a572cb338bc566ebf42126063cd97d903560bec..16007467a399e377bac5bb6b6a3608406ea8aae5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-number-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"number.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0d1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0xa_bcd_ef0_123_456_788'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0o1234576'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0b1_1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1.234_5e678_91'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
1
|
|
],
|
|
"end": [
|
|
9,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
10,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
11,
|
|
1
|
|
],
|
|
"end": [
|
|
11,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0d1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0xa_bcd_ef0_123_456_789'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
13,
|
|
1
|
|
],
|
|
"end": [
|
|
13,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0o1234567'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
14,
|
|
1
|
|
],
|
|
"end": [
|
|
14,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0b1_0'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
1
|
|
],
|
|
"end": [
|
|
15,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1.234_5e678_90'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"number.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/number.rb b/number.rb",
|
|
"index 1a73a0e..ed36c77 100644",
|
|
"--- a/number.rb",
|
|
"+++ b/number.rb",
|
|
"@@ -1,3 +1,19 @@",
|
|
"+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": "16007467a399e377bac5bb6b6a3608406ea8aae5..f48a1d65a1224fdadd905104da8a1c55db638228"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-number-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"number.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0d1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0xa_bcd_ef0_123_456_789'"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1235' with '0o1234567'"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1_235' with '0b1_0'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1.234_5e678_90'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0d1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0xa_bcd_ef0_123_456_788'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0o1234576'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0b1_1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1.234_5e678_91'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"number.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/number.rb b/number.rb",
|
|
"index ed36c77..ad686c2 100644",
|
|
"--- a/number.rb",
|
|
"+++ b/number.rb",
|
|
"@@ -1,10 +1,10 @@",
|
|
"-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"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "f48a1d65a1224fdadd905104da8a1c55db638228..57c06ba2036c9de0bdc01ae5e96bf68bff99ef56"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-number-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"number.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0d1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0xa_bcd_ef0_123_456_788'"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1234' with '0o1234576'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0b1_1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1.234_5e678_91'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0d1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0xa_bcd_ef0_123_456_789'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0o1234567'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0b1_0'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1.234_5e678_90'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"number.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/number.rb b/number.rb",
|
|
"index ad686c2..ed36c77 100644",
|
|
"--- a/number.rb",
|
|
"+++ b/number.rb",
|
|
"@@ -1,10 +1,10 @@",
|
|
"-1234",
|
|
"-1_234",
|
|
"-0d1_234",
|
|
"-0xa_bcd_ef0_123_456_789",
|
|
"-0o1234567",
|
|
"-0b1_0",
|
|
"-1.234_5e678_90",
|
|
"+1235",
|
|
"+1_235",
|
|
"+0d1_235",
|
|
"+0xa_bcd_ef0_123_456_788",
|
|
"+0o1234576",
|
|
"+0b1_1",
|
|
"+1.234_5e678_91",
|
|
" ",
|
|
" 1234",
|
|
" 1_234"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "57c06ba2036c9de0bdc01ae5e96bf68bff99ef56..e2a32ba0512202da9f70870fbe5783664b917e39"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-number-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"number.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0d1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0xa_bcd_ef0_123_456_788'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0o1234576'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0b1_1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"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'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
1
|
|
],
|
|
"end": [
|
|
9,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
10,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
11,
|
|
1
|
|
],
|
|
"end": [
|
|
11,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0d1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
12,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0xa_bcd_ef0_123_456_788'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
13,
|
|
1
|
|
],
|
|
"end": [
|
|
13,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0o1234576'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
14,
|
|
1
|
|
],
|
|
"end": [
|
|
14,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '0b1_1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
15,
|
|
1
|
|
],
|
|
"end": [
|
|
15,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1.234_5e678_91'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"number.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/number.rb b/number.rb",
|
|
"index ed36c77..033221c 100644",
|
|
"--- a/number.rb",
|
|
"+++ b/number.rb",
|
|
"@@ -1,11 +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",
|
|
"@@ -14,11 +6,11 @@",
|
|
" 0b1_0",
|
|
" 1.234_5e678_90",
|
|
" ",
|
|
"-1234",
|
|
"-1_234",
|
|
"-0d1_234",
|
|
"-0xa_bcd_ef0_123_456_789",
|
|
"-0o1234567",
|
|
"-0b1_0",
|
|
"-1.234_5e678_90",
|
|
"+1235",
|
|
"+1_235",
|
|
"+0d1_235",
|
|
"+0xa_bcd_ef0_123_456_788",
|
|
"+0o1234576",
|
|
"+0b1_1",
|
|
"+1.234_5e678_91",
|
|
" "
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "e2a32ba0512202da9f70870fbe5783664b917e39..aa543b3384da5ba032fe24037fd37ad7160124d6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-number-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"number.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0d1_234'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0xa_bcd_ef0_123_456_789'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0o1234567'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0b1_0'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1.234_5e678_90'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"number.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/number.rb b/number.rb",
|
|
"index 033221c..344510e 100644",
|
|
"--- a/number.rb",
|
|
"+++ b/number.rb",
|
|
"@@ -1,11 +1,3 @@",
|
|
"-1234",
|
|
"-1_234",
|
|
"-0d1_234",
|
|
"-0xa_bcd_ef0_123_456_789",
|
|
"-0o1234567",
|
|
"-0b1_0",
|
|
"-1.234_5e678_90",
|
|
"-",
|
|
" 1235",
|
|
" 1_235",
|
|
" 0d1_235"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "aa543b3384da5ba032fe24037fd37ad7160124d6..b797466344466b9cff18e819dca20b96f7e625e3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-number-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"number.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0d1_235'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0xa_bcd_ef0_123_456_788'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0o1234576'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '0b1_1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1.234_5e678_91'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"number.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/number.rb b/number.rb",
|
|
"index 344510e..e69de29 100644",
|
|
"--- a/number.rb",
|
|
"+++ b/number.rb",
|
|
"@@ -1,8 +0,0 @@",
|
|
"-1235",
|
|
"-1_235",
|
|
"-0d1_235",
|
|
"-0xa_bcd_ef0_123_456_788",
|
|
"-0o1234576",
|
|
"-0b1_1",
|
|
"-1.234_5e678_91",
|
|
"-"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "b797466344466b9cff18e819dca20b96f7e625e3..06e0c82cc4de92677af4b24443f616a6b3ddf682"
|
|
}]
|