mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
247 lines
6.6 KiB
JSON
247 lines
6.6 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-when-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' case statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index e69de29..f43e020 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+case foo",
|
|
"+when quux",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "6320f83c8822c0efc1ee3f921342eb41977e9fb8..74481b83f4aaaca4705cd56d25d4e0159eabf9f3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar' when comparison in the 'foo' case statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index f43e020..404ec25 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,3 +1,4 @@",
|
|
" case foo",
|
|
" when quux",
|
|
"+when bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "74481b83f4aaaca4705cd56d25d4e0159eabf9f3..3af728dfa3c929198a7b5f92b1326eef3e79c4e0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
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 404ec25..7fb75f1 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,4 +1,5 @@",
|
|
" case foo",
|
|
" when quux",
|
|
" when bar",
|
|
"+ baz",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "3af728dfa3c929198a7b5f92b1326eef3e79c4e0..e1127e3df1d1ca4cd0a0b1424e1eed2bb185a34f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
3
|
|
],
|
|
"end": [
|
|
4,
|
|
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 7fb75f1..404ec25 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,5 +1,4 @@",
|
|
" case foo",
|
|
" when quux",
|
|
" when bar",
|
|
"- baz",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "e1127e3df1d1ca4cd0a0b1424e1eed2bb185a34f..715d399400e789e7b9fe8d6298cb768670ddc619"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar' when comparison in the 'foo' case statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index 404ec25..f43e020 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,4 +1,3 @@",
|
|
" case foo",
|
|
" when quux",
|
|
"-when bar",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "715d399400e789e7b9fe8d6298cb768670ddc619..eb4e7c3c86b8e2410ba8cbde1a08156eb6ceded7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-when-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"when.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' case statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"when.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/when.rb b/when.rb",
|
|
"index f43e020..e69de29 100644",
|
|
"--- a/when.rb",
|
|
"+++ b/when.rb",
|
|
"@@ -1,3 +0,0 @@",
|
|
"-case foo",
|
|
"-when quux",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "eb4e7c3c86b8e2410ba8cbde1a08156eb6ceded7..2ffce3d30f77b7bd24e702013e47f91050c0ed06"
|
|
}]
|