mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
351 lines
11 KiB
JSON
351 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-regex-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '/^(foo|bar[^_])$/i' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.rb b/regex.rb",
|
|
"index e69de29..02dce9d 100644",
|
|
"--- a/regex.rb",
|
|
"+++ b/regex.rb",
|
|
"@@ -0,0 +1 @@",
|
|
"+/^(foo|bar[^_])$/i"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "72d6e4e549ce17f88e6130002ccc0ecd6302fdf2..c3d9695417e6678a456a6692f3f708f3578a9cf2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-regex-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '/^(foo|bar[^_])$/i' regex with '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.rb b/regex.rb",
|
|
"index 02dce9d..c801d61 100644",
|
|
"--- a/regex.rb",
|
|
"+++ b/regex.rb",
|
|
"@@ -1 +1,4 @@",
|
|
"+%r/a/",
|
|
"+%r<a<b>c>",
|
|
"+/^(foo|bar[^_])$/i",
|
|
" /^(foo|bar[^_])$/i"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "c3d9695417e6678a456a6692f3f708f3578a9cf2..390ab71fc475ff76aa74e63dc827efa8d620fd7c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-regex-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1 with the '/^(foo|bar[^_])$/i' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.rb b/regex.rb",
|
|
"index c801d61..42d4984 100644",
|
|
"--- a/regex.rb",
|
|
"+++ b/regex.rb",
|
|
"@@ -1,4 +1,3 @@",
|
|
"-%r/a/",
|
|
"-%r<a<b>c>",
|
|
"+/^(foo|bar[^_])$/i",
|
|
" /^(foo|bar[^_])$/i",
|
|
" /^(foo|bar[^_])$/i"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "390ab71fc475ff76aa74e63dc827efa8d620fd7c..226f8b30f81ea0db57e79e1212adfc07130c6872"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-regex-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '/^(foo|bar[^_])$/i' regex with '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.rb b/regex.rb",
|
|
"index 42d4984..c801d61 100644",
|
|
"--- a/regex.rb",
|
|
"+++ b/regex.rb",
|
|
"@@ -1,3 +1,4 @@",
|
|
"-/^(foo|bar[^_])$/i",
|
|
"+%r/a/",
|
|
"+%r<a<b>c>",
|
|
" /^(foo|bar[^_])$/i",
|
|
" /^(foo|bar[^_])$/i"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "226f8b30f81ea0db57e79e1212adfc07130c6872..b8e98f854bb60e2823c562708c8ac5a4d4668d1e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-regex-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '%r/a/\n%r<a<b>c>\n/^(foo|bar[^_])$/i\n/^(foo|bar[^_])$/i\n' at line 1, column 1 - line 5, column 1 with the '/^(foo|bar[^_])$/i' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.rb b/regex.rb",
|
|
"index c801d61..48e43a9 100644",
|
|
"--- a/regex.rb",
|
|
"+++ b/regex.rb",
|
|
"@@ -1,4 +1,3 @@",
|
|
"+/^(foo|bar[^_])$/i",
|
|
" %r/a/",
|
|
" %r<a<b>c>",
|
|
"-/^(foo|bar[^_])$/i",
|
|
"-/^(foo|bar[^_])$/i"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "b8e98f854bb60e2823c562708c8ac5a4d4668d1e..e9466dc38a6269d4defca09ae238272e8b593087"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-regex-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '/^(foo|bar[^_])$/i' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.rb b/regex.rb",
|
|
"index 48e43a9..b23927a 100644",
|
|
"--- a/regex.rb",
|
|
"+++ b/regex.rb",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-/^(foo|bar[^_])$/i",
|
|
" %r/a/",
|
|
" %r<a<b>c>"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "e9466dc38a6269d4defca09ae238272e8b593087..5f3afced7715c5a7e7454ccf1817f4f3450def9f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-regex-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '%r<a<b>c>' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"regex.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '%r/a/' at line 1, column 1 - line 1, column 6"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"regex.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.rb b/regex.rb",
|
|
"index b23927a..e69de29 100644",
|
|
"--- a/regex.rb",
|
|
"+++ b/regex.rb",
|
|
"@@ -1,2 +0,0 @@",
|
|
"-%r/a/",
|
|
"-%r<a<b>c>"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "5f3afced7715c5a7e7454ccf1817f4f3450def9f..38a4fc97908a2d22a188038b11a90fee2a3326eb"
|
|
}]
|