summaryrefslogtreecommitdiff
path: root/qpid/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
commitdcf5de9575a3f2aa32b4e0aeefe0c116082adee5 (patch)
treee21d8c8eb382fba1794d3cbb1e60905635454891 /qpid/cpp/src/tests/logging.cpp
parenta4968794228f5a40edee91d170d2bf13e7451a87 (diff)
downloadqpid-python-dcf5de9575a3f2aa32b4e0aeefe0c116082adee5.tar.gz
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
Diffstat (limited to 'qpid/cpp/src/tests/logging.cpp')
-rw-r--r--qpid/cpp/src/tests/logging.cpp6
1 files changed, 3 insertions, 3 deletions
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");