1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/ruby/unless.json
2016-11-03 16:02:56 -07:00

485 lines
14 KiB
JSON

[{
"testCaseDescription": "ruby-unless-insert-test",
"expectedResult": {
"changes": {
"unless.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
4
]
}
},
"summary": "Added the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"unless.rb"
],
"patch": [
"diff --git a/unless.rb b/unless.rb",
"index e69de29..dd4d758 100644",
"--- a/unless.rb",
"+++ b/unless.rb",
"@@ -0,0 +1,5 @@",
"+unless foo",
"+ bar",
"+else",
"+ bat",
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "8faf69d7a7d6454f74fea1b6ecf0dae989609b0c..8044cc943ad63fc15f21e305e0702aa8f1f8ca00"
}
,{
"testCaseDescription": "ruby-unless-replacement-insert-test",
"expectedResult": {
"changes": {
"unless.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
2,
4
]
}
},
"summary": "Added the 'x' unless statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
4,
4
]
}
},
"summary": "Added the 'y' unless statement"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
9,
4
]
}
},
"summary": "Added the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"unless.rb"
],
"patch": [
"diff --git a/unless.rb b/unless.rb",
"index dd4d758..6e36f98 100644",
"--- a/unless.rb",
"+++ b/unless.rb",
"@@ -1,3 +1,12 @@",
"+unless x",
"+end",
"+unless y then",
"+end",
"+unless foo",
"+ bar",
"+else",
"+ bat",
"+end",
" unless foo",
" bar",
" else"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "8044cc943ad63fc15f21e305e0702aa8f1f8ca00..421fd298292352aad4ed144da4828d0a0d9cbd88"
}
,{
"testCaseDescription": "ruby-unless-delete-insert-test",
"expectedResult": {
"changes": {
"unless.rb": [
{
"span": {
"replace": [
{
"start": [
1,
8
],
"end": [
1,
9
]
},
{
"start": [
1,
8
],
"end": [
1,
11
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
"summary": "Added the 'bar' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
1
]
}
},
"summary": "Added an else block"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
4,
4
]
}
},
"summary": "Deleted the 'y' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"unless.rb"
],
"patch": [
"diff --git a/unless.rb b/unless.rb",
"index 6e36f98..39ae1f8 100644",
"--- a/unless.rb",
"+++ b/unless.rb",
"@@ -1,6 +1,7 @@",
"-unless x",
"-end",
"-unless y then",
"+unless foo",
"+ bar",
"+else",
"+ bat",
" end",
" unless foo",
" bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "421fd298292352aad4ed144da4828d0a0d9cbd88..68e1d0c143e9543158ca85f1b64b45bff282e3cf"
}
,{
"testCaseDescription": "ruby-unless-replacement-test",
"expectedResult": {
"changes": {
"unless.rb": [
{
"span": {
"replace": [
{
"start": [
1,
8
],
"end": [
1,
11
]
},
{
"start": [
1,
8
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'bar' identifier"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
1
]
}
},
"summary": "Deleted an else block"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
4,
4
]
}
},
"summary": "Added the 'y' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"unless.rb"
],
"patch": [
"diff --git a/unless.rb b/unless.rb",
"index 39ae1f8..6e36f98 100644",
"--- a/unless.rb",
"+++ b/unless.rb",
"@@ -1,7 +1,6 @@",
"-unless foo",
"- bar",
"-else",
"- bat",
"+unless x",
"+end",
"+unless y then",
" end",
" unless foo",
" bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "68e1d0c143e9543158ca85f1b64b45bff282e3cf..9f55db52729087f221c9ce91cc85bb6e19ee369e"
}
,{
"testCaseDescription": "ruby-unless-delete-replacement-test",
"expectedResult": {
"changes": {
"unless.rb": [
{
"span": {
"delete": {
"start": [
10,
1
],
"end": [
14,
4
]
}
},
"summary": "Deleted the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"unless.rb"
],
"patch": [
"diff --git a/unless.rb b/unless.rb",
"index 6e36f98..5efe10d 100644",
"--- a/unless.rb",
"+++ b/unless.rb",
"@@ -1,14 +1,9 @@",
"-unless x",
"-end",
"-unless y then",
"-end",
" unless foo",
" bar",
" else",
" bat",
" end",
"-unless foo",
"- bar",
"-else",
"- bat",
"+unless x",
"+end",
"+unless y then",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "9f55db52729087f221c9ce91cc85bb6e19ee369e..68e4d44b8e476737c8fad32f27eaa39789b3b41b"
}
,{
"testCaseDescription": "ruby-unless-delete-test",
"expectedResult": {
"changes": {
"unless.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
4
]
}
},
"summary": "Deleted the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"unless.rb"
],
"patch": [
"diff --git a/unless.rb b/unless.rb",
"index 5efe10d..a38714d 100644",
"--- a/unless.rb",
"+++ b/unless.rb",
"@@ -1,8 +1,3 @@",
"-unless foo",
"- bar",
"-else",
"- bat",
"-end",
" unless x",
" end",
" unless y then"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "68e4d44b8e476737c8fad32f27eaa39789b3b41b..ca237de3933e84e5242f5cbd7dadf86c15058020"
}
,{
"testCaseDescription": "ruby-unless-delete-rest-test",
"expectedResult": {
"changes": {
"unless.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2,
4
]
}
},
"summary": "Deleted the 'x' unless statement"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
4,
4
]
}
},
"summary": "Deleted the 'y' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"unless.rb"
],
"patch": [
"diff --git a/unless.rb b/unless.rb",
"index a38714d..e69de29 100644",
"--- a/unless.rb",
"+++ b/unless.rb",
"@@ -1,4 +0,0 @@",
"-unless x",
"-end",
"-unless y then",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ca237de3933e84e5242f5cbd7dadf86c15058020..4e2fff03bd38fd80461d8cac1a09c40ca80b2390"
}]