1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/ruby/unless.json
2016-11-07 13:12:53 -08: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": "eb51a430951de620d64e6e92df9603e953708321..3305c9604e19f1adb5acc1ac48128f02ba8824b5"
}
,{
"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": "3305c9604e19f1adb5acc1ac48128f02ba8824b5..b375e5596a5e365eafe9b0d2bec7778f71f80a59"
}
,{
"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 in the foo unless statement"
},
{
"span": {
"insert": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
"summary": "Added the 'bar' identifier in the foo unless statement"
},
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
4,
6
]
}
},
"summary": "Added the 'bat' identifier in the foo 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 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": "b375e5596a5e365eafe9b0d2bec7778f71f80a59..f8fdadec2dc18f26cceabd013cc59cfc925f261d"
}
,{
"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 in the x unless statement"
},
{
"span": {
"delete": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'bar' identifier in the x unless statement"
},
{
"span": {
"delete": {
"start": [
4,
3
],
"end": [
4,
6
]
}
},
"summary": "Deleted the 'bat' identifier in the x unless statement"
},
{
"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": "f8fdadec2dc18f26cceabd013cc59cfc925f261d..ed0a3d5a27a0fef38499b6b79183b9afe9898a0e"
}
,{
"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": "ed0a3d5a27a0fef38499b6b79183b9afe9898a0e..0a0941c08b3a3f65dbcbf32e375689ae3c541b42"
}
,{
"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": "0a0941c08b3a3f65dbcbf32e375689ae3c541b42..95eeab305a4bd6687a1e532bc9be0965422ba737"
}
,{
"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": "95eeab305a4bd6687a1e532bc9be0965422ba737..4bf7d0bf7a5f56e68acbec672e139df1702a7f37"
}]