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
2017-01-10 16:58:40 -05: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": "520fbb8fa9f85ee196774c9005021489515618b3..449562fd8d61e4c1268fa3087f66f9e2df2b79ee"
}
,{
"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": "449562fd8d61e4c1268fa3087f66f9e2df2b79ee..900ae60470d0fa94ba0015e7903765f9232c8335"
}
,{
"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": "900ae60470d0fa94ba0015e7903765f9232c8335..a6f90034b2b62e818e4f68ce1e251f1e98ae8222"
}
,{
"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": "a6f90034b2b62e818e4f68ce1e251f1e98ae8222..06dc1207fb2dac23d49cf005d58a0828a0c125ad"
}
,{
"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": "06dc1207fb2dac23d49cf005d58a0828a0c125ad..c0bbe11af426437441d7edfa00961ba5de3cfdf9"
}
,{
"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": "c0bbe11af426437441d7edfa00961ba5de3cfdf9..93b308218ae021670219b3e822cdee9fd169819e"
}
,{
"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": "93b308218ae021670219b3e822cdee9fd169819e..fa51fd7eca6d05496c7a00b20ed7bb42c737927e"
}]