1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries-todo2/ruby/regex.json
2016-12-05 15:58:20 -08:00

384 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": "956b136e24f76c977fefd27d5368ecd527f721ec..49cb17b4244d627bd084dab1c7248c48a3cdb7cc"
}
,{
"testCaseDescription": "ruby-regex-replacement-insert-test",
"expectedResult": {
"changes": {
"regex.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the '%r/a/' regex"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
"summary": "Added the '%r<a<b>c>' regex"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
19
]
}
},
"summary": "Added the '/^(foo|bar[^_])$/i' regex"
}
]
},
"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": "49cb17b4244d627bd084dab1c7248c48a3cdb7cc..a73a7605d28b1fe2b09ce87d8db7426ea6295610"
}
,{
"testCaseDescription": "ruby-regex-delete-insert-test",
"expectedResult": {
"changes": {
"regex.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
6
]
},
{
"start": [
1,
1
],
"end": [
1,
19
]
}
]
},
"summary": "Replaced the '%r/a/' regex with the '/^(foo|bar[^_])$/i' regex"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
"summary": "Deleted the '%r<a<b>c>' 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": "a73a7605d28b1fe2b09ce87d8db7426ea6295610..edcc26845e0ed493216f7b8ce1235e7a37ace55d"
}
,{
"testCaseDescription": "ruby-regex-replacement-test",
"expectedResult": {
"changes": {
"regex.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
19
]
},
{
"start": [
1,
1
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced the '/^(foo|bar[^_])$/i' regex with the '%r/a/' regex"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
"summary": "Added the '%r<a<b>c>' regex"
}
]
},
"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": "edcc26845e0ed493216f7b8ce1235e7a37ace55d..46655f4fd04784ed0fd995951c5f83018cc02d97"
}
,{
"testCaseDescription": "ruby-regex-delete-replacement-test",
"expectedResult": {
"changes": {
"regex.rb": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
19
]
}
},
"summary": "Deleted 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": "46655f4fd04784ed0fd995951c5f83018cc02d97..dd7c07f9f3797a03b8a34fbd1efdbc98b01d2e76"
}
,{
"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": "dd7c07f9f3797a03b8a34fbd1efdbc98b01d2e76..a9ee657f847f069d80fe4f52e9b1fb3bf991f26f"
}
,{
"testCaseDescription": "ruby-regex-delete-rest-test",
"expectedResult": {
"changes": {
"regex.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the '%r/a/' regex"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
"summary": "Deleted the '%r<a<b>c>' regex"
}
]
},
"errors": {}
},
"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": "a9ee657f847f069d80fe4f52e9b1fb3bf991f26f..e8c4c9b4ba151237a0e88d5a650d34ee5a5a1b61"
}]