Address Daira's further comments
This commit is contained in:
@@ -163,6 +163,16 @@ BOOST_AUTO_TEST_CASE(util_ParseTorReplyMapping)
|
||||
{"TwoOctal", "TwoEnd\11"},
|
||||
});
|
||||
|
||||
// Special handling for null case
|
||||
// (needed because string comparison reads the null as end-of-string)
|
||||
BOOST_TEST_MESSAGE(std::string("CheckParseTorReplyMapping(Null=\"\\0\")"));
|
||||
auto ret = ParseTorReplyMapping("Null=\"\\0\"");
|
||||
BOOST_CHECK_EQUAL(ret.size(), 1);
|
||||
auto r_it = ret.begin();
|
||||
BOOST_CHECK_EQUAL(r_it->first, "Null");
|
||||
BOOST_CHECK_EQUAL(r_it->second.size(), 1);
|
||||
BOOST_CHECK_EQUAL(r_it->second[0], '\0');
|
||||
|
||||
// A more complex valid grammar. PROTOCOLINFO accepts a VersionLine that
|
||||
// takes a key=value pair followed by an OptArguments, making this valid.
|
||||
// Because an OptArguments contains no semantic data, there is no point in
|
||||
|
||||
Reference in New Issue
Block a user