mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
265 lines
7.5 KiB
JSON
265 lines
7.5 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-when-setup-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'case foo\nend\n' at line 1, column 1 - line 3, column 1"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index e69de29..ee23477 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -0,0 +1,2 @@",
|
|
"+case foo",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "2a333f87ffad507b301031bb834a3ff5de494681..23f7d05983320d2a1058aaead4208e34dda05b1e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced 'case foo\nend\n' at line 1, column 1 - line 3, column 1 with the 'foo' case statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index ee23477..92a40ca 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,2 +1,3 @@",
|
|
" case foo",
|
|
"+when bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "23f7d05983320d2a1058aaead4208e34dda05b1e..086e9626977efdd311aa09e18243a0fb13020238"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
3
|
|
],
|
|
"end": [
|
|
3,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'baz' identifier in the 'foo' case statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index 92a40ca..3c8eff2 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,3 +1,4 @@",
|
|
" case foo",
|
|
" when bar",
|
|
"+ baz",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "086e9626977efdd311aa09e18243a0fb13020238..94a9a99fb62da4b80f471348e1d22fbf1fb73314"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
3
|
|
],
|
|
"end": [
|
|
3,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'baz' identifier in the 'foo' case statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index 3c8eff2..92a40ca 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,4 +1,3 @@",
|
|
" case foo",
|
|
" when bar",
|
|
"- baz",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "94a9a99fb62da4b80f471348e1d22fbf1fb73314..54460279cb840b39dc5dd6bff051d4447ad52d76"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' case statement with 'case foo\nend\n' at line 1, column 1 - line 3, column 1"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index 92a40ca..ee23477 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,3 +1,2 @@",
|
|
" case foo",
|
|
"-when bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "54460279cb840b39dc5dd6bff051d4447ad52d76..00b7f93996b247d117350e68700d35cae7be2af4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'case foo\nend\n' at line 1, column 1 - line 3, column 1"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index ee23477..e69de29 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,2 +0,0 @@",
|
|
"-case foo",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "00b7f93996b247d117350e68700d35cae7be2af4..dc728dc832b54a104ba4f5f6847606f10ce8434e"
|
|
}]
|