mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
539 lines
16 KiB
JSON
539 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-string-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '' string"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo with \"bar\"' string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string.rb b/string.rb",
|
|
"index e69de29..8d1b50a 100644",
|
|
"--- a/string.rb",
|
|
"+++ b/string.rb",
|
|
"@@ -0,0 +1,2 @@",
|
|
"+''",
|
|
"+'foo with \"bar\"'"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "59e2edbe041b887605acb7a535fcceacb50d82a3..e65d8c9000cf029d28a1673f020f37eb43dfd4be"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-string-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"\" string"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"bar with 'foo'\" string"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '' string"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo with \"bar\"' string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string.rb b/string.rb",
|
|
"index 8d1b50a..f1597ee 100644",
|
|
"--- a/string.rb",
|
|
"+++ b/string.rb",
|
|
"@@ -1,2 +1,6 @@",
|
|
"+\"\"",
|
|
"+\"bar with 'foo'\"",
|
|
"+''",
|
|
"+'foo with \"bar\"'",
|
|
" ''",
|
|
" 'foo with \"bar\"'"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "e65d8c9000cf029d28a1673f020f37eb43dfd4be..ce8dd8c8d416851edf4cda7e77c90f7c84706213"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-string-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"\" string with the '' string"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"bar with 'foo'\" string with the 'foo with \"bar\"' string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string.rb b/string.rb",
|
|
"index f1597ee..6158c1a 100644",
|
|
"--- a/string.rb",
|
|
"+++ b/string.rb",
|
|
"@@ -1,5 +1,5 @@",
|
|
"-\"\"",
|
|
"-\"bar with 'foo'\"",
|
|
"+''",
|
|
"+'foo with \"bar\"'",
|
|
" ''",
|
|
" 'foo with \"bar\"'",
|
|
" ''"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "ce8dd8c8d416851edf4cda7e77c90f7c84706213..052fa225974c071dad866d796ddde1aecf5b0b35"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-string-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '' string with the \"\" string"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo with \"bar\"' string with the \"bar with 'foo'\" string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string.rb b/string.rb",
|
|
"index 6158c1a..f1597ee 100644",
|
|
"--- a/string.rb",
|
|
"+++ b/string.rb",
|
|
"@@ -1,5 +1,5 @@",
|
|
"-''",
|
|
"-'foo with \"bar\"'",
|
|
"+\"\"",
|
|
"+\"bar with 'foo'\"",
|
|
" ''",
|
|
" 'foo with \"bar\"'",
|
|
" ''"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "052fa225974c071dad866d796ddde1aecf5b0b35..7fbee64365bc046de4be39070d47b51793272da8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-string-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"\" string"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"bar with 'foo'\" string"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '' string"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo with \"bar\"' string"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"\" string"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"bar with 'foo'\" string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string.rb b/string.rb",
|
|
"index f1597ee..b8be05c 100644",
|
|
"--- a/string.rb",
|
|
"+++ b/string.rb",
|
|
"@@ -1,6 +1,4 @@",
|
|
"-\"\"",
|
|
"-\"bar with 'foo'\"",
|
|
"-''",
|
|
"-'foo with \"bar\"'",
|
|
" ''",
|
|
" 'foo with \"bar\"'",
|
|
"+\"\"",
|
|
"+\"bar with 'foo'\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "7fbee64365bc046de4be39070d47b51793272da8..a54602000f3a38376ca4a677e1e0fe0da4a42275"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-string-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '' string"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo with \"bar\"' string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string.rb b/string.rb",
|
|
"index b8be05c..83e4a68 100644",
|
|
"--- a/string.rb",
|
|
"+++ b/string.rb",
|
|
"@@ -1,4 +1,2 @@",
|
|
"-''",
|
|
"-'foo with \"bar\"'",
|
|
" \"\"",
|
|
" \"bar with 'foo'\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "a54602000f3a38376ca4a677e1e0fe0da4a42275..133025dbfa9e5e2089ca6bb7fce8001446d7dee3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-string-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"\" string"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"bar with 'foo'\" string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string.rb b/string.rb",
|
|
"index 83e4a68..e69de29 100644",
|
|
"--- a/string.rb",
|
|
"+++ b/string.rb",
|
|
"@@ -1,2 +0,0 @@",
|
|
"-\"\"",
|
|
"-\"bar with 'foo'\""
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "133025dbfa9e5e2089ca6bb7fce8001446d7dee3..2505617f30ca311da1378227cbf6a13d83647b91"
|
|
}]
|