[Libreoffice-commits] online.git: 2 commits - loolwsd/LOOLKit.cpp loolwsd/test
Tor Lillqvist
tml at collabora.com
Thu Feb 18 16:37:31 UTC 2016
loolwsd/LOOLKit.cpp | 2 +-
loolwsd/test/httpposttest.cpp | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 3d817e914e0e818708b936142f6d14f425ae5784
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Feb 18 18:35:32 2016 +0200
When running against a LOK_PREINIT=1 loolwsd, for some reason we get a BOM
So skip that.
diff --git a/loolwsd/test/httpposttest.cpp b/loolwsd/test/httpposttest.cpp
index d94df95..3094281 100644
--- a/loolwsd/test/httpposttest.cpp
+++ b/loolwsd/test/httpposttest.cpp
@@ -52,7 +52,14 @@ void HTTPPostTest::testConvertTo()
std::ifstream fileStream(TDOC "/hello.txt");
std::stringstream expectedStream;
expectedStream << fileStream.rdbuf();
- CPPUNIT_ASSERT_EQUAL(expectedStream.str(), actualStream.str());
+
+ // In some cases the result is prefixed with (the UTF-8 encoding of) the Unicode BOM
+ // (U+FEFF). Skip that.
+ std::string actualString = actualStream.str();
+ if (actualString.size() > 3 &&
+ actualString[0] == '\xEF' && actualString[1] == '\xBB' && actualString[2] == '\xBF')
+ actualString = actualString.substr(3);
+ CPPUNIT_ASSERT_EQUAL(expectedStream.str(), actualString);
}
CPPUNIT_TEST_SUITE_REGISTRATION(HTTPPostTest);
commit 7a97e1a1bc7c6b92f04846cc7aa3850f261c3ff6
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Feb 18 18:14:21 2016 +0200
Remove pointless duplicated information from a log line
The log lines automatically have information telling which process
they come from.
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index fb4e641..3895609 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -720,7 +720,7 @@ void lokit_main(const std::string& childRoot,
}
#endif
- Log::info("loolkit -> chroot(\"" + jailPath.toString() + "\")");
+ Log::info("chroot(\"" + jailPath.toString() + "\")");
if (chroot(jailPath.toString().c_str()) == -1)
{
Log::error("Error: chroot(\"" + jailPath.toString() + "\") failed.");
More information about the Libreoffice-commits
mailing list