Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
29c59c01
Commit
29c59c01
authored
Sep 13, 2024
by
Federico Di Pierro
Committed by
Jesse Beder
Oct 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new(test): added a test to avoid future issues with LoadAll().
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
parent
bc671571
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
test/integration/node_spec_test.cpp
+7
-0
test/specexamples.h
+3
-0
No files found.
test/integration/node_spec_test.cpp
View file @
29c59c01
...
...
@@ -941,6 +941,13 @@ TEST(NodeSpecTest, Ex7_24_FlowNodes) {
EXPECT_EQ
(
""
,
doc
[
4
].
as
<
std
::
string
>
());
}
TEST
(
NodeSpecTest
,
Ex7_25_InfiniteLoopNodes
)
{
// Until yaml-cpp <= 0.8.0 this caused an infinite loop;
// After, it triggers an exception (but LoadAll is smart enough to avoid
// the infinite loop in any case).
ASSERT_THROW
(
LoadAll
(
ex7_25
),
ParserException
);
}
TEST
(
NodeSpecTest
,
Ex8_1_BlockScalarHeader
)
{
Node
doc
=
Load
(
ex8_1
);
EXPECT_EQ
(
4
,
doc
.
size
());
...
...
test/specexamples.h
View file @
29c59c01
...
...
@@ -687,6 +687,9 @@ const char *ex7_24 =
"- *anchor
\n
"
"- !!str"
;
const
char
*
ex7_25
=
","
;
const
char
*
ex8_1
=
"- | # Empty header
\n
"
" literal
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment