|
|
|
@ -1233,12 +1233,46 @@ class IndentationTestCase(RuleTestCase):
|
|
|
|
|
|
|
|
|
|
def test_explicit_block_mappings(self):
|
|
|
|
|
conf = 'indentation: {spaces: consistent}'
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'object:\n'
|
|
|
|
|
' ? key\n'
|
|
|
|
|
' : value\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'object:\n'
|
|
|
|
|
' ? key\n'
|
|
|
|
|
' :\n'
|
|
|
|
|
' value\n'
|
|
|
|
|
'...\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'object:\n'
|
|
|
|
|
' ?\n'
|
|
|
|
|
' key\n'
|
|
|
|
|
' : value\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'object:\n'
|
|
|
|
|
' ?\n'
|
|
|
|
|
' key\n'
|
|
|
|
|
' :\n'
|
|
|
|
|
' value\n'
|
|
|
|
|
'...\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'- ? key\n'
|
|
|
|
|
' : value\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'- ? key\n'
|
|
|
|
|
' :\n'
|
|
|
|
|
' value\n'
|
|
|
|
|
'...\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'- ?\n'
|
|
|
|
|
' key\n'
|
|
|
|
|
' : value\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'- ?\n'
|
|
|
|
|
' key\n'
|
|
|
|
|
' :\n'
|
|
|
|
|
' value\n'
|
|
|
|
|
'...\n', conf)
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'object:\n'
|
|
|
|
|
' ? key\n'
|
|
|
|
@ -1246,12 +1280,11 @@ class IndentationTestCase(RuleTestCase):
|
|
|
|
|
' value\n'
|
|
|
|
|
'...\n', conf, problem=(5, 8))
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'object:\n'
|
|
|
|
|
' ?\n'
|
|
|
|
|
'- - ?\n'
|
|
|
|
|
' key\n'
|
|
|
|
|
' :\n'
|
|
|
|
|
' value\n'
|
|
|
|
|
'...\n', conf)
|
|
|
|
|
'...\n', conf, problem=(5, 7))
|
|
|
|
|
self.check('---\n'
|
|
|
|
|
'object:\n'
|
|
|
|
|
' ?\n'
|
|
|
|
|