mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
411 lines
12 KiB
JSON
411 lines
12 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-begin-block-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin-block.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin-block.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin-block.rb b/begin-block.rb",
|
|
"index e69de29..689ee83 100644",
|
|
"--- a/begin-block.rb",
|
|
"+++ b/begin-block.rb",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+BEGIN {",
|
|
"+ foo",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "4d6bab5f42cedc4c3c222fb92aa3b2df6e7d2c74..a7917b3331b14023bcaad2d4ede01f7d8c95749d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-block-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin-block.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
2
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin-block.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin-block.rb b/begin-block.rb",
|
|
"index 689ee83..6d35684 100644",
|
|
"--- a/begin-block.rb",
|
|
"+++ b/begin-block.rb",
|
|
"@@ -1,3 +1,10 @@",
|
|
"+foo",
|
|
"+BEGIN {",
|
|
"+ bar",
|
|
"+}",
|
|
"+BEGIN {",
|
|
"+ foo",
|
|
"+}",
|
|
" BEGIN {",
|
|
" foo",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "a7917b3331b14023bcaad2d4ede01f7d8c95749d..b2b95470fbb1c6c91b9151494c13386f7cd93cbd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-block-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin-block.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin-block.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin-block.rb b/begin-block.rb",
|
|
"index 6d35684..59f3ea8 100644",
|
|
"--- a/begin-block.rb",
|
|
"+++ b/begin-block.rb",
|
|
"@@ -1,6 +1,5 @@",
|
|
"-foo",
|
|
" BEGIN {",
|
|
"- bar",
|
|
"+ foo",
|
|
" }",
|
|
" BEGIN {",
|
|
" foo"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "b2b95470fbb1c6c91b9151494c13386f7cd93cbd..165a084d630ecb68bc6e7074d0695fedc72d7562"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-block-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin-block.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' identifier with the 'bar' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin-block.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin-block.rb b/begin-block.rb",
|
|
"index 59f3ea8..6d35684 100644",
|
|
"--- a/begin-block.rb",
|
|
"+++ b/begin-block.rb",
|
|
"@@ -1,5 +1,6 @@",
|
|
"+foo",
|
|
" BEGIN {",
|
|
"- foo",
|
|
"+ bar",
|
|
" }",
|
|
" BEGIN {",
|
|
" foo"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "165a084d630ecb68bc6e7074d0695fedc72d7562..8f1a41f724060b5d5b6f0e50150b28b0758f44dd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-block-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin-block.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
2
|
|
],
|
|
"end": [
|
|
9,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin-block.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin-block.rb b/begin-block.rb",
|
|
"index 6d35684..422d4eb 100644",
|
|
"--- a/begin-block.rb",
|
|
"+++ b/begin-block.rb",
|
|
"@@ -1,10 +1,7 @@",
|
|
"-foo",
|
|
"-BEGIN {",
|
|
"- bar",
|
|
"-}",
|
|
" BEGIN {",
|
|
" foo",
|
|
" }",
|
|
"+foo",
|
|
" BEGIN {",
|
|
"- foo",
|
|
"+ bar",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "8f1a41f724060b5d5b6f0e50150b28b0758f44dd..5b412bf54be49dac5e97c8de3a5b595a9ab2e92d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-block-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin-block.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin-block.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin-block.rb b/begin-block.rb",
|
|
"index 422d4eb..a936ce1 100644",
|
|
"--- a/begin-block.rb",
|
|
"+++ b/begin-block.rb",
|
|
"@@ -1,6 +1,3 @@",
|
|
"-BEGIN {",
|
|
"- foo",
|
|
"-}",
|
|
" foo",
|
|
" BEGIN {",
|
|
" bar"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "5b412bf54be49dac5e97c8de3a5b595a9ab2e92d..79734ccc02456fb6ff54e8e202b7f8d48228a734"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-begin-block-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"begin-block.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"begin-block.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/begin-block.rb b/begin-block.rb",
|
|
"index a936ce1..e69de29 100644",
|
|
"--- a/begin-block.rb",
|
|
"+++ b/begin-block.rb",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-foo",
|
|
"-BEGIN {",
|
|
"- bar",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "79734ccc02456fb6ff54e8e202b7f8d48228a734..130384923ce3911f879b540bfaa20cda886c7695"
|
|
}]
|