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
2017-01-10 16:58:40 -05: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": "ac2bbe61ccddc8ead463c2e4ebd7a09fb9228a66..010b97aab2710be4f4bed37757db1415cff4a936"
}
,{
"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": "010b97aab2710be4f4bed37757db1415cff4a936..1619bde1e834f352a0abcc9f361ca05cdeb97ef8"
}
,{
"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": "1619bde1e834f352a0abcc9f361ca05cdeb97ef8..9bae694672f32c4e41e28fd6a245042cc83fdf99"
}
,{
"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": "9bae694672f32c4e41e28fd6a245042cc83fdf99..11840f23d9fd3d63eeebb84e3f2a332e2823fa1f"
}
,{
"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": "11840f23d9fd3d63eeebb84e3f2a332e2823fa1f..b0d5a77e68cccc63b8b1941b9b1c67627c47100e"
}
,{
"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": "b0d5a77e68cccc63b8b1941b9b1c67627c47100e..4df098d8eba0a4b5706784ec6f6f429cea45f60c"
}
,{
"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": "4df098d8eba0a4b5706784ec6f6f429cea45f60c..cba61c2c03f723e5a636f5eae1044060295c649e"
}]