summaryrefslogtreecommitdiff
path: root/cpp/src/tests/logging.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-02-12 18:04:11 +0000
committerAlan Conway <aconway@apache.org>2008-02-12 18:04:11 +0000
commit6e835338bdd2411ff31fb90a6d6675ae23b15dc5 (patch)
tree0b624583f0a9a0c974815e5e7bd93937c20321b1 /cpp/src/tests/logging.cpp
parentddc98e6bba8fc8d6ee4ad993ff2f7079dd75ef42 (diff)
downloadqpid-python-6e835338bdd2411ff31fb90a6d6675ae23b15dc5.tar.gz
Quote all non-printable ASCII characters (not just control characters)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@620889 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/logging.cpp')
-rw-r--r--cpp/src/tests/logging.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/tests/logging.cpp b/cpp/src/tests/logging.cpp
index 4969c3d6a9..2c0ed08105 100644
--- a/cpp/src/tests/logging.cpp
+++ b/cpp/src/tests/logging.cpp
@@ -367,7 +367,7 @@ BOOST_AUTO_TEST_CASE(testLoggerConfigure) {
unlink("logging.tmp");
}
-BOOST_AUTO_TEST_CASE(testQuoteControlChars) {
+BOOST_AUTO_TEST_CASE(testQuoteNonPrintable) {
Logger& l=Logger::instance();
l.clear();
Options opts;
@@ -375,13 +375,13 @@ BOOST_AUTO_TEST_CASE(testQuoteControlChars) {
opts.outputs.push_back("logging.tmp");
opts.time=false;
l.configure(opts, "test");
- char s[] = "null\0tab\tspace newline\nret\r";
+ char s[] = "null\0tab\tspace newline\nret\r\x80\x99\xff";
string str(s, sizeof(s));
QPID_LOG(critical, str);
ifstream log("logging.tmp");
string line;
getline(log, line);
- string expect="critical null^@tab^Ispace newline^Jret^M^@";
+ string expect="critical null\\00tab\\09space newline\\0Aret\\0D\\80\\99\\FF\\00";
BOOST_CHECK_EQUAL(expect, line);
log.close();
unlink("logging.tmp");