mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
348 lines
11 KiB
JSON
348 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-rescue-modifier-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-modifier.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'rescue nil' modifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-modifier.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-modifier.rb b/rescue-modifier.rb",
|
|
"index e69de29..b0cea1a 100644",
|
|
"--- a/rescue-modifier.rb",
|
|
"+++ b/rescue-modifier.rb",
|
|
"@@ -0,0 +1 @@",
|
|
"+foo rescue nil"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "875face60282636c8ba6fbd9db4a50c6b8b38fd2..08e8f151a897162bcc784bf475633d3b383d622c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-modifier-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-modifier.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'rescue false' modifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'rescue nil' modifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-modifier.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-modifier.rb b/rescue-modifier.rb",
|
|
"index b0cea1a..79b1f6a 100644",
|
|
"--- a/rescue-modifier.rb",
|
|
"+++ b/rescue-modifier.rb",
|
|
"@@ -1 +1,3 @@",
|
|
"+foo rescue false",
|
|
"+foo rescue nil",
|
|
" foo rescue nil"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "08e8f151a897162bcc784bf475633d3b383d622c..6dd1eeaed545d30b4013e2afaa27e5eab0fd0e71"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-modifier-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-modifier.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'rescue false' modifier with the 'rescue nil' modifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-modifier.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-modifier.rb b/rescue-modifier.rb",
|
|
"index 79b1f6a..f59c8c2 100644",
|
|
"--- a/rescue-modifier.rb",
|
|
"+++ b/rescue-modifier.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-foo rescue false",
|
|
"+foo rescue nil",
|
|
" foo rescue nil",
|
|
" foo rescue nil"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "6dd1eeaed545d30b4013e2afaa27e5eab0fd0e71..2de1d6af1e7c40afe318d9d73d6296bce398aca3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-modifier-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-modifier.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'rescue nil' modifier with the 'rescue false' modifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-modifier.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-modifier.rb b/rescue-modifier.rb",
|
|
"index f59c8c2..79b1f6a 100644",
|
|
"--- a/rescue-modifier.rb",
|
|
"+++ b/rescue-modifier.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-foo rescue nil",
|
|
"+foo rescue false",
|
|
" foo rescue nil",
|
|
" foo rescue nil"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "2de1d6af1e7c40afe318d9d73d6296bce398aca3..7446beb4ceb30fca9b6fe2a50aa3af2b7974f94b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-modifier-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-modifier.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'rescue false' modifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'rescue nil' modifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'rescue false' modifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-modifier.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-modifier.rb b/rescue-modifier.rb",
|
|
"index 79b1f6a..509bcea 100644",
|
|
"--- a/rescue-modifier.rb",
|
|
"+++ b/rescue-modifier.rb",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-foo rescue false",
|
|
"-foo rescue nil",
|
|
" foo rescue nil",
|
|
"+foo rescue false"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "7446beb4ceb30fca9b6fe2a50aa3af2b7974f94b..da15018c29958edbc41e34ca412c990df7b3c0a2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-modifier-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-modifier.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'rescue nil' modifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-modifier.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-modifier.rb b/rescue-modifier.rb",
|
|
"index 509bcea..c36274a 100644",
|
|
"--- a/rescue-modifier.rb",
|
|
"+++ b/rescue-modifier.rb",
|
|
"@@ -1,2 +1 @@",
|
|
"-foo rescue nil",
|
|
" foo rescue false"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "da15018c29958edbc41e34ca412c990df7b3c0a2..51c759c77ac04eb4b2d197b3aecabc971d439cde"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-rescue-modifier-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rescue-modifier.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'rescue false' modifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rescue-modifier.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rescue-modifier.rb b/rescue-modifier.rb",
|
|
"index c36274a..e69de29 100644",
|
|
"--- a/rescue-modifier.rb",
|
|
"+++ b/rescue-modifier.rb",
|
|
"@@ -1 +0,0 @@",
|
|
"-foo rescue false"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "51c759c77ac04eb4b2d197b3aecabc971d439cde..6c195e290e7613379817885b55119b8158a86bb2"
|
|
}]
|