1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/ruby/if-unless-modifiers.json

354 lines
11 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "ruby-if-unless-modifiers-insert-test",
"expectedResult": {
"changes": {
"if-unless-modifiers.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
17
]
}
},
"summary": "Added the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-unless-modifiers.rb"
],
"patch": [
"diff --git a/if-unless-modifiers.rb b/if-unless-modifiers.rb",
"index e69de29..45ff4a6 100644",
"--- a/if-unless-modifiers.rb",
"+++ b/if-unless-modifiers.rb",
"@@ -0,0 +1 @@",
"+print unless foo"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "4e2fff03bd38fd80461d8cac1a09c40ca80b2390..a156c775baf7ff53bfebb34f0b044ceca96516e0"
}
,{
"testCaseDescription": "ruby-if-unless-modifiers-replacement-insert-test",
"expectedResult": {
"changes": {
"if-unless-modifiers.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'foo' if statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
17
]
}
},
"summary": "Added the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-unless-modifiers.rb"
],
"patch": [
"diff --git a/if-unless-modifiers.rb b/if-unless-modifiers.rb",
"index 45ff4a6..cb2925a 100644",
"--- a/if-unless-modifiers.rb",
"+++ b/if-unless-modifiers.rb",
"@@ -1 +1,3 @@",
"+print if foo",
"+print unless foo",
" print unless foo"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a156c775baf7ff53bfebb34f0b044ceca96516e0..935c4f046aca16b663c3b7bbf15bb4e3b89df95f"
}
,{
"testCaseDescription": "ruby-if-unless-modifiers-delete-insert-test",
"expectedResult": {
"changes": {
"if-unless-modifiers.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
17
]
}
},
"summary": "Added the 'foo' unless statement"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'foo' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-unless-modifiers.rb"
],
"patch": [
"diff --git a/if-unless-modifiers.rb b/if-unless-modifiers.rb",
"index cb2925a..04f425e 100644",
"--- a/if-unless-modifiers.rb",
"+++ b/if-unless-modifiers.rb",
"@@ -1,3 +1,3 @@",
"-print if foo",
"+print unless foo",
" print unless foo",
" print unless foo"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "935c4f046aca16b663c3b7bbf15bb4e3b89df95f..2f5c75839c978eb166b5ce29ddcb0c663222be8e"
}
,{
"testCaseDescription": "ruby-if-unless-modifiers-replacement-test",
"expectedResult": {
"changes": {
"if-unless-modifiers.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'foo' if statement"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
17
]
}
},
"summary": "Deleted the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-unless-modifiers.rb"
],
"patch": [
"diff --git a/if-unless-modifiers.rb b/if-unless-modifiers.rb",
"index 04f425e..cb2925a 100644",
"--- a/if-unless-modifiers.rb",
"+++ b/if-unless-modifiers.rb",
"@@ -1,3 +1,3 @@",
"-print unless foo",
"+print if foo",
" print unless foo",
" print unless foo"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "2f5c75839c978eb166b5ce29ddcb0c663222be8e..85ce995a212ec872107b09fd0baba8b62286c999"
}
,{
"testCaseDescription": "ruby-if-unless-modifiers-delete-replacement-test",
"expectedResult": {
"changes": {
"if-unless-modifiers.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'foo' if statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
17
]
}
},
"summary": "Deleted the 'foo' unless statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'foo' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-unless-modifiers.rb"
],
"patch": [
"diff --git a/if-unless-modifiers.rb b/if-unless-modifiers.rb",
"index cb2925a..a3f9060 100644",
"--- a/if-unless-modifiers.rb",
"+++ b/if-unless-modifiers.rb",
"@@ -1,3 +1,2 @@",
"-print if foo",
"-print unless foo",
" print unless foo",
"+print if foo"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "85ce995a212ec872107b09fd0baba8b62286c999..38fd6b10133d898160cd44223c081010ca440b6f"
}
,{
"testCaseDescription": "ruby-if-unless-modifiers-delete-test",
"expectedResult": {
"changes": {
"if-unless-modifiers.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
17
]
}
},
"summary": "Deleted the 'foo' unless statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-unless-modifiers.rb"
],
"patch": [
"diff --git a/if-unless-modifiers.rb b/if-unless-modifiers.rb",
"index a3f9060..2021b1b 100644",
"--- a/if-unless-modifiers.rb",
"+++ b/if-unless-modifiers.rb",
"@@ -1,2 +1 @@",
"-print unless foo",
" print if foo"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "38fd6b10133d898160cd44223c081010ca440b6f..52722842753439887074cefb1075c6a31015bc82"
}
,{
"testCaseDescription": "ruby-if-unless-modifiers-delete-rest-test",
"expectedResult": {
"changes": {
"if-unless-modifiers.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'foo' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-unless-modifiers.rb"
],
"patch": [
"diff --git a/if-unless-modifiers.rb b/if-unless-modifiers.rb",
"index 2021b1b..e69de29 100644",
"--- a/if-unless-modifiers.rb",
"+++ b/if-unless-modifiers.rb",
"@@ -1 +0,0 @@",
"-print if foo"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "52722842753439887074cefb1075c6a31015bc82..c7d3f438c72d2ab2a09e3fa47ba1cf9b175d2a9b"
}]