[Libreoffice-commits] core.git: sw/JunitTest_sw_complex.mk sw/qa
Michael Stahl
mstahl at redhat.com
Fri Nov 13 08:42:44 PST 2015
sw/JunitTest_sw_complex.mk | 8 +-------
sw/qa/complex/writer/CheckBookmarks.java | 2 +-
2 files changed, 2 insertions(+), 8 deletions(-)
New commits:
commit 126df1eee630d357443c52e08dd1712c5a1f3234
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 13 17:26:20 2015 +0100
sw: solve the CheckBookmarks fails on WNT mystery
After many years of careful investigation, we finally managed to solve
the mystery: it turns out that Windows has different line endings than
UNIX, which results in different hash values starting at m_nLinebreakHash.
Change-Id: Ib5fab7cd43ad10ea9a33c29857c5b53c84e623fb
diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
index e9b344c..2539943 100644
--- a/sw/JunitTest_sw_complex.mk
+++ b/sw/JunitTest_sw_complex.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_JunitTest_use_jars,sw_complex,\
$(eval $(call gb_JunitTest_add_classes,sw_complex,\
complex.accessibility.AccessibleRelationSet \
complex.checkColor.CheckChangeColor \
+ complex.writer.CheckBookmarks \
complex.writer.CheckCrossReferences \
complex.writer.CheckFlies \
complex.writer.CheckTable \
@@ -58,11 +59,4 @@ $(eval $(call gb_JunitTest_add_classes,sw_complex,\
complex.writer.TextPortionEnumerationTest \
))
-# FIXME has never worked on windows, hashes are different
-ifneq ($(OS),WNT)
-$(eval $(call gb_JunitTest_add_classes,sw_complex,\
- complex.writer.CheckBookmarks \
-))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java
index a5e1a9e..9acb16a 100644
--- a/sw/qa/complex/writer/CheckBookmarks.java
+++ b/sw/qa/complex/writer/CheckBookmarks.java
@@ -72,7 +72,7 @@ class BookmarkHashes {
xBookmark);
buffer.append(sBookmarkname);
buffer.append(':');
- buffer.append(xBookmarkAsContent.getAnchor().getString());
+ buffer.append(xBookmarkAsContent.getAnchor().getString().replaceAll("\r\n", "\n"));
buffer.append(';');
}
java.security.MessageDigest sha1 = java.security.MessageDigest.getInstance("SHA-1");
More information about the Libreoffice-commits
mailing list