Merge 3a1070d061 into 39f737443b
This commit is contained in:
commit
87931e11e8
@ -82,7 +82,7 @@ inline const RegEx& Utf8_ByteOrderMark() {
|
|||||||
// actual tags
|
// actual tags
|
||||||
|
|
||||||
inline const RegEx& DocStart() {
|
inline const RegEx& DocStart() {
|
||||||
static const RegEx e = RegEx("---") + (BlankOrBreak() | RegEx());
|
static const RegEx e = RegEx("---");
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
inline const RegEx& DocEnd() {
|
inline const RegEx& DocEnd() {
|
||||||
|
|||||||
@ -1682,5 +1682,15 @@ TEST_F(HandlerSpecTest, Ex8_22_BlockCollectionNodes) {
|
|||||||
EXPECT_CALL(handler, OnDocumentEnd());
|
EXPECT_CALL(handler, OnDocumentEnd());
|
||||||
Parse(ex8_22);
|
Parse(ex8_22);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(HandlerSpecTest, InvalidDocStart1) {
|
||||||
|
EXPECT_THROW_PARSER_EXCEPTION(IgnoreParse("----\nbaz: 1"),
|
||||||
|
ErrorMsg::BLOCK_ENTRY);
|
||||||
|
}
|
||||||
|
TEST_F(HandlerSpecTest, InvalidDocStart2) {
|
||||||
|
EXPECT_THROW_PARSER_EXCEPTION(IgnoreParse("----\n# foo\nbaz: 1"),
|
||||||
|
ErrorMsg::BLOCK_ENTRY);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace YAML
|
} // namespace YAML
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user