Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
797df940
Commit
797df940
authored
Jan 16, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue/1014' into topic/0.17.4
parents
0646c523
2bb962ac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
libcaf_core/caf/detail/parser/read_ini.hpp
libcaf_core/caf/detail/parser/read_ini.hpp
+1
-1
libcaf_core/test/detail/parser/read_ini.cpp
libcaf_core/test/detail/parser/read_ini.cpp
+52
-0
No files found.
libcaf_core/caf/detail/parser/read_ini.hpp
View file @
797df940
...
@@ -112,7 +112,7 @@ void read_ini_map(State& ps, Consumer&& consumer) {
...
@@ -112,7 +112,7 @@ void read_ini_map(State& ps, Consumer&& consumer) {
state
(
await_key_name
)
{
state
(
await_key_name
)
{
transition
(
await_key_name
,
"
\t\n
"
)
transition
(
await_key_name
,
"
\t\n
"
)
fsm_epsilon
(
read_ini_comment
(
ps
,
consumer
),
await_key_name
,
';'
)
fsm_epsilon
(
read_ini_comment
(
ps
,
consumer
),
await_key_name
,
';'
)
transition
(
read_key_name
,
alpha
bet
ic_chars
,
key
=
ch
)
transition
(
read_key_name
,
alpha
numer
ic_chars
,
key
=
ch
)
transition
(
done
,
'}'
,
consumer
.
end_map
())
transition
(
done
,
'}'
,
consumer
.
end_map
())
}
}
// Reads a key of a "key=value" line.
// Reads a key of a "key=value" line.
...
...
libcaf_core/test/detail/parser/read_ini.cpp
View file @
797df940
...
@@ -279,4 +279,56 @@ CAF_TEST(invalid inis) {
...
@@ -279,4 +279,56 @@ CAF_TEST(invalid inis) {
CAF_CHECK_EQUAL
(
parse
(
ini3
),
ini3_log
);
CAF_CHECK_EQUAL
(
parse
(
ini3
),
ini3_log
);
}
}
CAF_TEST
(
integer
keys
are
legal
in
INI
syntax
)
{
static
constexpr
string_view
ini
=
R"__(
[foo.bar]
1 = 10
2 = 20
)__"
;
// clang-format off
auto
log
=
make_log
(
"key: foo"
,
"{"
,
"key: bar"
,
"{"
,
"key: 1"
,
"value (integer): 10"
,
"key: 2"
,
"value (integer): 20"
,
"}"
,
"}"
);
// clang-format on
CAF_CHECK_EQUAL
(
parse
(
ini
),
log
);
}
CAF_TEST
(
integer
keys
are
legal
in
config
syntax
)
{
static
constexpr
string_view
ini
=
R"__(
foo {
bar {
1 = 10
2 = 20
}
}
)__"
;
// clang-format off
auto
log
=
make_log
(
"key: global"
,
"{"
,
"key: foo"
,
"{"
,
"key: bar"
,
"{"
,
"key: 1"
,
"value (integer): 10"
,
"key: 2"
,
"value (integer): 20"
,
"}"
,
"}"
,
"}"
);
// clang-format on
CAF_CHECK_EQUAL
(
parse
(
ini
),
log
);
}
CAF_TEST_FIXTURE_SCOPE_END
()
CAF_TEST_FIXTURE_SCOPE_END
()
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