mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
492 lines
16 KiB
JSON
492 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": "1348e47cfcd21ebc8f7693453b14835daf726244..648f040b4932437ade8a705635587a0939858f24"
|
|
}
|
|
,{
|
|
"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": "648f040b4932437ade8a705635587a0939858f24..84f022c36ea61cfde11d18137176a272015dfd29"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':key1 => \"value\"' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the ':key2 => 1' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
48
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'key1: \"changed value\"' pair with the '\"key3\": false' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
26
|
|
],
|
|
"end": [
|
|
1,
|
|
33
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
50
|
|
],
|
|
"end": [
|
|
1,
|
|
69
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'key2: 2' pair with the ':\"symbol_key\" => 10' 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": "84f022c36ea61cfde11d18137176a272015dfd29..0e9857eefe9380563594d1e0fd97e258792e09e9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-hash-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"hash.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'key1: \"changed value\"' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
26
|
|
],
|
|
"end": [
|
|
1,
|
|
33
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the ':key1 => \"value\"' pair with 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": "0e9857eefe9380563594d1e0fd97e258792e09e9..82454529535c539fd7208ad3dd7a6321959a1330"
|
|
}
|
|
,{
|
|
"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": "82454529535c539fd7208ad3dd7a6321959a1330..54bfbaa7b24548519cffc6c2182f5bb4624f00c3"
|
|
}
|
|
,{
|
|
"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": "54bfbaa7b24548519cffc6c2182f5bb4624f00c3..30cd85ffe6d456179c6c0d357d9d77019d4b8702"
|
|
}
|
|
,{
|
|
"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": "30cd85ffe6d456179c6c0d357d9d77019d4b8702..a8b440ad76232e4e95f5a5ed53b9b6604ece8a17"
|
|
}]
|