Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
a756c801
Commit
a756c801
authored
Feb 29, 2012
by
Jelte Jansen
Browse files
[1722] fix tab escape in whitespace replacer
parent
e202628c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/masterload.cc
View file @
a756c801
...
...
@@ -55,7 +55,7 @@ stripLine(string& s, const Exception& ex) {
s
.
resize
(
pos_semicolon
);
}
// Remove any trailing whitespace return the resulting text.
s
.
resize
(
s
.
find_last_not_of
(
"
/
t"
)
+
1
);
s
.
resize
(
s
.
find_last_not_of
(
"
\
t
"
)
+
1
);
return
(
s
);
}
}
...
...
src/lib/dns/tests/masterload_unittest.cc
View file @
a756c801
...
...
@@ -230,6 +230,17 @@ TEST_F(MasterLoadTest, loadRRWithEOLWhitespace) {
"1 0 1 beef"
)));
}
TEST_F
(
MasterLoadTest
,
loadRRWithEOLWhitespaceTab
)
{
// Similar to the previous one, but there's no space before comments.
// It should still work.
rr_stream
<<
"example.com. 3600 IN NSEC3PARAM 1 0 1 beef
\t\n
"
;
masterLoad
(
rr_stream
,
origin
,
zclass
,
callback
);
ASSERT_EQ
(
1
,
results
.
size
());
EXPECT_EQ
(
0
,
results
[
0
]
->
getRdataIterator
()
->
getCurrent
().
compare
(
*
rdata
::
createRdata
(
RRType
::
NSEC3PARAM
(),
zclass
,
"1 0 1 beef"
)));
}
TEST_F
(
MasterLoadTest
,
loadRRNoComment
)
{
// A semicolon in a character-string shouldn't confuse the parser.
rr_stream
<<
"example.com. 3600 IN TXT
\"
aaa;bbb
\"\n
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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