Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
446
Issues
446
List
Boards
Labels
Service Desk
Milestones
Merge Requests
71
Merge Requests
71
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
843eaa0b
Commit
843eaa0b
authored
Nov 19, 2012
by
JINMEI Tatuya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2373] added a test for qstring: confirm separators are regarded as part of str
parent
c3d39b62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
src/lib/dns/tests/master_lexer_state_unittest.cc
src/lib/dns/tests/master_lexer_state_unittest.cc
+11
-1
No files found.
src/lib/dns/tests/master_lexer_state_unittest.cc
View file @
843eaa0b
...
...
@@ -362,7 +362,12 @@ TEST_F(MasterLexerStateTest, stringEscape) {
TEST_F
(
MasterLexerStateTest
,
quotedString
)
{
ss
<<
"
\"
ignore-quotes
\"\n
"
;
ss
<<
"
\"
quoted string
\"
"
;
ss
<<
"
\"
quoted string
\"
"
;
// space is part of the qstring
// also check other separator characters. note that \r doesn't cause
// UNBALANCED_QUOTES. Not sure if it's intentional, but that's how the
// BIND 9 version works, so we follow it (it should be too minor to matter
// in practice anyway)
ss
<<
"
\"
quoted()
\t\r
string
\"
"
;
ss
<<
"
\"
escape
\\
in quote
\"
"
;
ss
<<
"
\"
escaped
\\\"\"
"
;
ss
<<
"
\"
escaped backslash
\\\\\"
"
;
...
...
@@ -384,6 +389,11 @@ TEST_F(MasterLexerStateTest, quotedString) {
EXPECT_EQ
(
s_null
,
s_qstring
.
handle
(
lexer
));
stringTokenCheck
(
"quoted string"
,
s_string
.
getToken
(
lexer
),
true
);
// Also checks other separator characters within a qstring
EXPECT_EQ
(
&
s_qstring
,
State
::
start
(
lexer
,
options
));
EXPECT_EQ
(
s_null
,
s_qstring
.
handle
(
lexer
));
stringTokenCheck
(
"quoted()
\t\r
string"
,
s_string
.
getToken
(
lexer
),
true
);
// escape character mostly doesn't have any effect in the qstring
// processing
EXPECT_EQ
(
&
s_qstring
,
State
::
start
(
lexer
,
options
));
...
...
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