mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
348 lines
10 KiB
JSON
348 lines
10 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-regex-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '/one/g' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.js b/regex.js",
|
|
"index e69de29..b381842 100644",
|
|
"--- a/regex.js",
|
|
"+++ b/regex.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+/one/g;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "734bede3c6c3771f011aa729a417011d310ec5cc..9dbffbb28707342ebcd361c29b0d670a271ddb04"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-regex-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '/on[^/]afe/gim' regex"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '/one/g' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.js b/regex.js",
|
|
"index b381842..6ed4b42 100644",
|
|
"--- a/regex.js",
|
|
"+++ b/regex.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+/on[^/]afe/gim;",
|
|
"+/one/g;",
|
|
" /one/g;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "9dbffbb28707342ebcd361c29b0d670a271ddb04..f294c4a4aac8d0a945272edb200af0866b0d5a0f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-regex-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '/on[^/]afe/gim' regex with the '/one/g' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.js b/regex.js",
|
|
"index 6ed4b42..abb87ec 100644",
|
|
"--- a/regex.js",
|
|
"+++ b/regex.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-/on[^/]afe/gim;",
|
|
"+/one/g;",
|
|
" /one/g;",
|
|
" /one/g;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f294c4a4aac8d0a945272edb200af0866b0d5a0f..c158c5219c063572ee6664525f8fb4377178cdc3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-regex-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '/one/g' regex with the '/on[^/]afe/gim' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.js b/regex.js",
|
|
"index abb87ec..6ed4b42 100644",
|
|
"--- a/regex.js",
|
|
"+++ b/regex.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-/one/g;",
|
|
"+/on[^/]afe/gim;",
|
|
" /one/g;",
|
|
" /one/g;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c158c5219c063572ee6664525f8fb4377178cdc3..38ad972ed8f499cb320e4584c4ae1b95d4e70f41"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-regex-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '/on[^/]afe/gim' regex"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '/one/g' regex"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '/on[^/]afe/gim' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.js b/regex.js",
|
|
"index 6ed4b42..9f57e91 100644",
|
|
"--- a/regex.js",
|
|
"+++ b/regex.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-/on[^/]afe/gim;",
|
|
"-/one/g;",
|
|
" /one/g;",
|
|
"+/on[^/]afe/gim;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "38ad972ed8f499cb320e4584c4ae1b95d4e70f41..79078d16f7a00fca2b3dbf3cf7dadd8f5ba7929c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-regex-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '/one/g' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.js b/regex.js",
|
|
"index 9f57e91..9b04194 100644",
|
|
"--- a/regex.js",
|
|
"+++ b/regex.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-/one/g;",
|
|
" /on[^/]afe/gim;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "79078d16f7a00fca2b3dbf3cf7dadd8f5ba7929c..f293398786080c6f5b99e7c36ba482702f5cbbae"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-regex-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"regex.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '/on[^/]afe/gim' regex"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"regex.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/regex.js b/regex.js",
|
|
"index 9b04194..e69de29 100644",
|
|
"--- a/regex.js",
|
|
"+++ b/regex.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-/on[^/]afe/gim;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f293398786080c6f5b99e7c36ba482702f5cbbae..4951403c16600a8ebe50779236bcbc480c823807"
|
|
}]
|