mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +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": "c6531c42e8172d308c2389344beaac8023b4c729..363d52f81f9d88c04630b143a852c50fe30bbce1"
|
|
}
|
|
,{
|
|
"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": "363d52f81f9d88c04630b143a852c50fe30bbce1..9f2412ae9fa68e2e40ed9591a2aa2f04ed0efb22"
|
|
}
|
|
,{
|
|
"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": "9f2412ae9fa68e2e40ed9591a2aa2f04ed0efb22..78ce208f801514bfff461ee10f717953ae227701"
|
|
}
|
|
,{
|
|
"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": "78ce208f801514bfff461ee10f717953ae227701..d7deb6e573f328264ec2d7f60e8a7c91a19f11e5"
|
|
}
|
|
,{
|
|
"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": "d7deb6e573f328264ec2d7f60e8a7c91a19f11e5..0ddcb4cbefeb0a96d49ea74eed8b0884c9b1d439"
|
|
}
|
|
,{
|
|
"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": "0ddcb4cbefeb0a96d49ea74eed8b0884c9b1d439..ccd9a6a0ba30a015112361cf6ee6c4eeaad51538"
|
|
}
|
|
,{
|
|
"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": "ccd9a6a0ba30a015112361cf6ee6c4eeaad51538..1ff4601a166d78743c85dba523065e31a5264033"
|
|
}]
|