Rules: document-start: Allow directives
This commit is contained in:
@@ -85,6 +85,20 @@ class DocumentStartTestCase(RuleTestCase):
|
||||
'third: document\n', conf, problem=(4, 1))
|
||||
|
||||
def test_directives(self):
|
||||
# TODO
|
||||
# %YAML 1.2
|
||||
pass
|
||||
conf = 'document-start: {present: yes}'
|
||||
self.check('%YAML 1.2\n'
|
||||
'---\n'
|
||||
'doc: ument\n'
|
||||
'...\n', conf)
|
||||
self.check('%YAML 1.2\n'
|
||||
'%TAG ! tag:clarkevans.com,2002:\n'
|
||||
'---\n'
|
||||
'doc: ument\n'
|
||||
'...\n', conf)
|
||||
self.check('---\n'
|
||||
'doc: 1\n'
|
||||
'...\n'
|
||||
'%YAML 1.2\n'
|
||||
'---\n'
|
||||
'doc: 2\n'
|
||||
'...\n', conf)
|
||||
|
||||
@@ -29,3 +29,9 @@ class YamlLintTestCase(RuleTestCase):
|
||||
'this is an error: [\n'
|
||||
'\n'
|
||||
'...\n', None, problem=(6, 1))
|
||||
|
||||
def test_directives(self):
|
||||
self.check('%YAML 1.2\n'
|
||||
'%TAG ! tag:clarkevans.com,2002:\n'
|
||||
'doc: ument\n'
|
||||
'...\n', None, problem=(3, 1))
|
||||
|
||||
Reference in New Issue
Block a user