Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
4c982d59
"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "35f95fe9b8a53927688b3ba0cbc234190b7a27c1"
Unverified
Commit
4c982d59
authored
Apr 19, 2022
by
Dr. Andre Vehreschild
Committed by
GitHub
Apr 19, 2022
Browse files
Improve build and fix single cr on windows (#1099)
parent
7d066556
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
src/exp.h
src/exp.h
+1
-1
test/integration/load_node_test.cpp
test/integration/load_node_test.cpp
+15
-0
No files found.
src/exp.h
View file @
4c982d59
...
...
@@ -37,7 +37,7 @@ inline const RegEx& Blank() {
return
e
;
}
inline
const
RegEx
&
Break
()
{
static
const
RegEx
e
=
RegEx
(
'\n'
)
|
RegEx
(
"
\r
"
);
static
const
RegEx
e
=
RegEx
(
'\n'
)
|
RegEx
(
"
\r
\n
"
)
|
RegEx
(
'\r'
);
return
e
;
}
inline
const
RegEx
&
BlankOrBreak
()
{
...
...
test/integration/load_node_test.cpp
View file @
4c982d59
...
...
@@ -345,5 +345,20 @@ TEST(NodeTest, LoadTagWithNullScalar) {
EXPECT_TRUE
(
node
.
IsNull
());
}
TEST
(
LoadNodeTest
,
BlockCRNLEncoded
)
{
Node
node
=
Load
(
"blockText: |
\r\n
"
" some arbitrary text
\r\n
"
" spanning some
\r\n
"
" lines, that are split
\r\n
"
" by CR and NL
\r\n
"
"followup: 1"
);
EXPECT_EQ
(
"some arbitrary text
\n
spanning some
\n
lines, that are split
\n
by CR and "
"NL
\n
"
,
node
[
"blockText"
].
as
<
std
::
string
>
());
EXPECT_EQ
(
1
,
node
[
"followup"
].
as
<
int
>
());
}
}
// namespace
}
// namespace YAML
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