1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00
semantic/test/corpus/diff-summaries/ruby/unless.json

485 lines
14 KiB
JSON
Raw Normal View History

[{
"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",
2017-01-11 00:58:40 +03:00
"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",
2017-01-11 00:58:40 +03:00
"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
]
}
]
},
2016-11-08 00:12:53 +03:00
"summary": "Replaced the 'x' identifier with the 'foo' identifier in the foo unless statement"
},
{
"span": {
2016-11-02 22:32:46 +03:00
"insert": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
2016-11-08 00:12:53 +03:00
"summary": "Added the 'bar' identifier in the foo unless statement"
},
{
"span": {
"insert": {
"start": [
2016-11-07 21:26:59 +03:00
4,
3
],
"end": [
2016-11-07 21:26:59 +03:00
4,
6
]
}
},
2016-11-08 00:12:53 +03:00
"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",
2017-01-11 00:58:40 +03:00
"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
]
}
]
},
2016-11-08 00:12:53 +03:00
"summary": "Replaced the 'foo' identifier with the 'x' identifier in the x unless statement"
},
{
"span": {
2016-11-02 22:32:46 +03:00
"delete": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
2016-11-08 00:12:53 +03:00
"summary": "Deleted the 'bar' identifier in the x unless statement"
},
{
"span": {
"delete": {
"start": [
2016-11-07 21:26:59 +03:00
4,
3
],
"end": [
2016-11-07 21:26:59 +03:00
4,
6
]
}
},
2016-11-08 00:12:53 +03:00
"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",
2017-01-11 00:58:40 +03:00
"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",
2017-01-11 00:58:40 +03:00
"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",
2017-01-11 00:58:40 +03:00
"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",
2017-01-11 00:58:40 +03:00
"shas": "4df098d8eba0a4b5706784ec6f6f429cea45f60c..cba61c2c03f723e5a636f5eae1044060295c649e"
}]