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/and-or.json
2016-12-06 11:56:42 -08:00

384 lines
11 KiB
JSON

[{
"testCaseDescription": "ruby-and-or-insert-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Added the 'foo and bar' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"and-or.rb"
],
"patch": [
"diff --git a/and-or.rb b/and-or.rb",
"index e69de29..8e828c0 100644",
"--- a/and-or.rb",
"+++ b/and-or.rb",
"@@ -0,0 +1 @@",
"+foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "48bff6bf54e74bb5709add925c8101431133d29b..718a1f41b48403cdcb927be311af138014047e2a"
}
,{
"testCaseDescription": "ruby-and-or-replacement-insert-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
11
]
}
},
"summary": "Added the 'foo or bar' binary statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'a or b and c' binary statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
12
]
}
},
"summary": "Added the 'foo and bar' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"and-or.rb"
],
"patch": [
"diff --git a/and-or.rb b/and-or.rb",
"index 8e828c0..fe52247 100644",
"--- a/and-or.rb",
"+++ b/and-or.rb",
"@@ -1 +1,4 @@",
"+foo or bar",
"+a or b and c",
"+foo and bar",
" foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "718a1f41b48403cdcb927be311af138014047e2a..b7e04363c991e6a2cd1df38c5f20aa8e9ff7e337"
}
,{
"testCaseDescription": "ruby-and-or-delete-insert-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
11
]
},
{
"start": [
1,
1
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced the 'foo or bar' binary statement with the 'foo and bar' binary statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Deleted the 'a or b and c' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"and-or.rb"
],
"patch": [
"diff --git a/and-or.rb b/and-or.rb",
"index fe52247..b09c067 100644",
"--- a/and-or.rb",
"+++ b/and-or.rb",
"@@ -1,4 +1,3 @@",
"-foo or bar",
"-a or b and c",
"+foo and bar",
" foo and bar",
" foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "b7e04363c991e6a2cd1df38c5f20aa8e9ff7e337..82a2a103e2f86084de0d80d198270d87f02eda63"
}
,{
"testCaseDescription": "ruby-and-or-replacement-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
12
]
},
{
"start": [
1,
1
],
"end": [
1,
11
]
}
]
},
"summary": "Replaced the 'foo and bar' binary statement with the 'foo or bar' binary statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'a or b and c' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"and-or.rb"
],
"patch": [
"diff --git a/and-or.rb b/and-or.rb",
"index b09c067..fe52247 100644",
"--- a/and-or.rb",
"+++ b/and-or.rb",
"@@ -1,3 +1,4 @@",
"-foo and bar",
"+foo or bar",
"+a or b and c",
" foo and bar",
" foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "82a2a103e2f86084de0d80d198270d87f02eda63..d10ab6a75880a64eef54c3aa82d677def1938901"
}
,{
"testCaseDescription": "ruby-and-or-delete-replacement-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
12
]
}
},
"summary": "Deleted the 'foo and bar' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"and-or.rb"
],
"patch": [
"diff --git a/and-or.rb b/and-or.rb",
"index fe52247..a621325 100644",
"--- a/and-or.rb",
"+++ b/and-or.rb",
"@@ -1,4 +1,3 @@",
"+foo and bar",
" foo or bar",
" a or b and c",
"-foo and bar",
"-foo and bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d10ab6a75880a64eef54c3aa82d677def1938901..f4fa4f7622bdfac02faa1feecd7993e7201467b2"
}
,{
"testCaseDescription": "ruby-and-or-delete-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'foo and bar' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"and-or.rb"
],
"patch": [
"diff --git a/and-or.rb b/and-or.rb",
"index a621325..d2060f6 100644",
"--- a/and-or.rb",
"+++ b/and-or.rb",
"@@ -1,3 +1,2 @@",
"-foo and bar",
" foo or bar",
" a or b and c"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f4fa4f7622bdfac02faa1feecd7993e7201467b2..9971253676f78cad3cc69fd652b087501fb4c0bc"
}
,{
"testCaseDescription": "ruby-and-or-delete-rest-test",
"expectedResult": {
"changes": {
"and-or.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
11
]
}
},
"summary": "Deleted the 'foo or bar' binary statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Deleted the 'a or b and c' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"and-or.rb"
],
"patch": [
"diff --git a/and-or.rb b/and-or.rb",
"index d2060f6..e69de29 100644",
"--- a/and-or.rb",
"+++ b/and-or.rb",
"@@ -1,2 +0,0 @@",
"-foo or bar",
"-a or b and c"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "9971253676f78cad3cc69fd652b087501fb4c0bc..e29d844a20e10103ff1197d78c6639bba8fc6e8a"
}]