document-end: Fix spurious "missing document end"
DocumentStartToken is preceded by DirectiveToken.
This commit is contained in:
committed by
Adrien Vergé
parent
7f2c071545
commit
a68c3aa69e
@@ -71,3 +71,22 @@ class DocumentEndTestCase(RuleTestCase):
|
||||
'---\n'
|
||||
'third: document\n'
|
||||
'...\n', conf, problem=(6, 1))
|
||||
|
||||
def test_directives(self):
|
||||
conf = 'document-end: {present: true}'
|
||||
self.check('%YAML 1.2\n'
|
||||
'---\n'
|
||||
'document: end\n'
|
||||
'...\n', conf)
|
||||
self.check('%YAML 1.2\n'
|
||||
'%TAG ! tag:clarkevans.com,2002:\n'
|
||||
'---\n'
|
||||
'document: end\n'
|
||||
'...\n', conf)
|
||||
self.check('---\n'
|
||||
'first: document\n'
|
||||
'...\n'
|
||||
'%YAML 1.2\n'
|
||||
'---\n'
|
||||
'second: document\n'
|
||||
'...\n', conf)
|
||||
|
||||
Reference in New Issue
Block a user