From dcf5de9575a3f2aa32b4e0aeefe0c116082adee5 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 12 Feb 2008 18:04:11 +0000 Subject: Quote all non-printable ASCII characters (not just control characters) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@620889 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/logging.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qpid/cpp/src/tests/logging.cpp') diff --git a/qpid/cpp/src/tests/logging.cpp b/qpid/cpp/src/tests/logging.cpp index 4969c3d6a9..2c0ed08105 100644 --- a/qpid/cpp/src/tests/logging.cpp +++ b/qpid/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"); -- cgit v1.2.1