mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
495 lines
16 KiB
JSON
495 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-hash-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
71
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"hash.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/hash.rb b/hash.rb",
|
|
"index e69de29..925618f 100644",
|
|
"--- a/hash.rb",
|
|
"+++ b/hash.rb",
|
|
"@@ -0,0 +1 @@",
|
|
"+{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "5c66ec3700761ca4868e703f576449f5a190e5a5..8ed1097ecb63f00552d0dcf65c4d7f97e554660a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
47
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ key1: \"changed value\", key2: 2, key3: true }' object"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
71
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"hash.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/hash.rb b/hash.rb",
|
|
"index 925618f..a0c7d41 100644",
|
|
"--- a/hash.rb",
|
|
"+++ b/hash.rb",
|
|
"@@ -1 +1,3 @@",
|
|
"+{ key1: \"changed value\", key2: 2, key3: true }",
|
|
"+{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "8ed1097ecb63f00552d0dcf65c4d7f97e554660a..3f945480d1d0fdcff6cc85bbd257acb2471d9eb3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'key1: \"changed value\"' pair with the ':key1 => \"value\"' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':key2 => 1' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
48
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '\"key3\": false' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
50
|
|
],
|
|
"end": [
|
|
1,
|
|
69
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':\"symbol_key\" => 10' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
26
|
|
],
|
|
"end": [
|
|
1,
|
|
33
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'key2: 2' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
35
|
|
],
|
|
"end": [
|
|
1,
|
|
45
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'key3: true' pair"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"hash.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/hash.rb b/hash.rb",
|
|
"index a0c7d41..d4ed2ec 100644",
|
|
"--- a/hash.rb",
|
|
"+++ b/hash.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-{ key1: \"changed value\", key2: 2, key3: true }",
|
|
"+{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "3f945480d1d0fdcff6cc85bbd257acb2471d9eb3..e651384951227cdfcca2e2aa341af92e0102c265"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':key1 => \"value\"' pair with the 'key1: \"changed value\"' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
26
|
|
],
|
|
"end": [
|
|
1,
|
|
33
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'key2: 2' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
35
|
|
],
|
|
"end": [
|
|
1,
|
|
45
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':key2 => 1' pair with the 'key3: true' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
48
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '\"key3\": false' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
50
|
|
],
|
|
"end": [
|
|
1,
|
|
69
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the ':\"symbol_key\" => 10' pair"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"hash.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/hash.rb b/hash.rb",
|
|
"index d4ed2ec..a0c7d41 100644",
|
|
"--- a/hash.rb",
|
|
"+++ b/hash.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
"+{ key1: \"changed value\", key2: 2, key3: true }",
|
|
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "e651384951227cdfcca2e2aa341af92e0102c265..acf16b47847c4ad4eeea4f57c6591d882b4d7b81"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
47
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ key1: \"changed value\", key2: 2, key3: true }' object"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
71
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
47
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ key1: \"changed value\", key2: 2, key3: true }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"hash.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/hash.rb b/hash.rb",
|
|
"index a0c7d41..4154b7d 100644",
|
|
"--- a/hash.rb",
|
|
"+++ b/hash.rb",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-{ key1: \"changed value\", key2: 2, key3: true }",
|
|
"-{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
"+{ key1: \"changed value\", key2: 2, key3: true }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "acf16b47847c4ad4eeea4f57c6591d882b4d7b81..84a7aaf829ca724982d91d7067bd23f7e374d2a4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
71
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"hash.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/hash.rb b/hash.rb",
|
|
"index 4154b7d..4a0e8d0 100644",
|
|
"--- a/hash.rb",
|
|
"+++ b/hash.rb",
|
|
"@@ -1,2 +1 @@",
|
|
"-{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
|
|
" { key1: \"changed value\", key2: 2, key3: true }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "84a7aaf829ca724982d91d7067bd23f7e374d2a4..61ca4b1cef66d8a37f57f077826691d4b34ca91c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
47
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ key1: \"changed value\", key2: 2, key3: true }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"hash.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/hash.rb b/hash.rb",
|
|
"index 4a0e8d0..e69de29 100644",
|
|
"--- a/hash.rb",
|
|
"+++ b/hash.rb",
|
|
"@@ -1 +0,0 @@",
|
|
"-{ key1: \"changed value\", key2: 2, key3: true }"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "61ca4b1cef66d8a37f57f077826691d4b34ca91c..39c849e6aaf280116d0b8523fe9ae7af2ff7ffee"
|
|
}]
|