.\n in emails appears to screw things up, so add a space.
authorCarl Hetherington <cth@carlh.net>
Thu, 6 Nov 2014 23:28:09 +0000 (23:28 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 6 Nov 2014 23:28:09 +0000 (23:28 +0000)
src/lib/log.cc
test/file_log_test.cc

index 934664915b0e5d9d4608a2e81276315ba7553544..daef13f77aa1fae64eaf8a7fffced1eae016f6b0 100644 (file)
@@ -151,7 +151,7 @@ FileLog::head_and_tail (int amount) const
        out += string (buffer);
 
        if (tail_amount > 0) {
-               out +=  "\n.\n.\n.\n";
+               out +=  "\n .\n .\n .\n";
 
                fseek (f, - tail_amount - 1, SEEK_END);
                
index 1cf7a7757cf39e3dda7ee9aef93fea51cbbb294b..a587b87efa25c5e495f0436743ce8d93034cf2e3 100644 (file)
@@ -26,5 +26,5 @@ BOOST_AUTO_TEST_CASE (file_log_test)
 {
        FileLog log ("test/data/short.log");
        BOOST_CHECK_EQUAL (log.head_and_tail (1024), "This is a short log.\nWith only two lines.\n");
-       BOOST_CHECK_EQUAL (log.head_and_tail (8), "This is \n.\n.\n.\no lines.\n");
+       BOOST_CHECK_EQUAL (log.head_and_tail (8), "This is \n .\n .\n .\no lines.\n");
 }