mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
346 lines
9.4 KiB
JSON
346 lines
9.4 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-module-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"module.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"module.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/module.rb b/module.rb",
|
|
"index e69de29..85026ed 100644",
|
|
"--- a/module.rb",
|
|
"+++ b/module.rb",
|
|
"@@ -0,0 +1,2 @@",
|
|
"+module Foo",
|
|
"+end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "ec2870c9e829ba9514a3fc196f778f73f25ff514..fc5596953a89def29b838f1bcaa689e32d02861d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-module-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"module.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"module.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/module.rb b/module.rb",
|
|
"index 85026ed..d95af14 100644",
|
|
"--- a/module.rb",
|
|
"+++ b/module.rb",
|
|
"@@ -1,2 +1,8 @@",
|
|
" module Foo",
|
|
"+ def bar",
|
|
"+end",
|
|
"+end",
|
|
"+module Foo",
|
|
"+end",
|
|
"+module Foo",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "fc5596953a89def29b838f1bcaa689e32d02861d..17b944ba7702c5a613dee5ed6536278b197232cc"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-module-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"module.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar()' method in the Foo module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"module.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/module.rb b/module.rb",
|
|
"index d95af14..5900129 100644",
|
|
"--- a/module.rb",
|
|
"+++ b/module.rb",
|
|
"@@ -1,6 +1,4 @@",
|
|
" module Foo",
|
|
"- def bar",
|
|
"-end",
|
|
" end",
|
|
" module Foo",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "17b944ba7702c5a613dee5ed6536278b197232cc..ee567744be0b36eb4ab0930af2a5027c4801bdaa"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-module-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"module.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
3
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar()' method in the Foo module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"module.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/module.rb b/module.rb",
|
|
"index 5900129..d95af14 100644",
|
|
"--- a/module.rb",
|
|
"+++ b/module.rb",
|
|
"@@ -1,4 +1,6 @@",
|
|
" module Foo",
|
|
"+ def bar",
|
|
"+end",
|
|
" end",
|
|
" module Foo",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "ee567744be0b36eb4ab0930af2a5027c4801bdaa..7167cd94cb9c66be463a313b0baec73abceb599f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-module-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"module.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"module.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/module.rb b/module.rb",
|
|
"index d95af14..ea3880b 100644",
|
|
"--- a/module.rb",
|
|
"+++ b/module.rb",
|
|
"@@ -1,8 +1,6 @@",
|
|
" module Foo",
|
|
"- def bar",
|
|
"-end",
|
|
" end",
|
|
" module Foo",
|
|
"+ def bar",
|
|
" end",
|
|
"-module Foo",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "7167cd94cb9c66be463a313b0baec73abceb599f..d0bc7277adfefda3feaa14bc4f02e2b52eeca3a1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-module-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"module.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"module.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/module.rb b/module.rb",
|
|
"index ea3880b..4199c41 100644",
|
|
"--- a/module.rb",
|
|
"+++ b/module.rb",
|
|
"@@ -1,6 +1,4 @@",
|
|
" module Foo",
|
|
"-end",
|
|
"-module Foo",
|
|
" def bar",
|
|
" end",
|
|
" end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "d0bc7277adfefda3feaa14bc4f02e2b52eeca3a1..7b26ca6bdc6f76b77ab1ea732d41055b1902d529"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-module-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"module.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"module.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/module.rb b/module.rb",
|
|
"index 4199c41..e69de29 100644",
|
|
"--- a/module.rb",
|
|
"+++ b/module.rb",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-module Foo",
|
|
"- def bar",
|
|
"-end",
|
|
"-end"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "7b26ca6bdc6f76b77ab1ea732d41055b1902d529..f99339c141252271935202cb6c4b96a5076cf574"
|
|
}]
|