-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/33.x: #5019 - SVGs embedded in MHTML files are not rendered #5017 - Encoding set in MHTML files is not respected #5015 - Update installation documentation for new initial password setting mechanism % Conflicts: % inception/pom.xml
- Loading branch information
Showing
12 changed files
with
11,061 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-29.9 KB
...rc/main/resources/META-INF/asciidoc/user-guide/images/getting_started_login.png
Binary file not shown.
Binary file added
BIN
+67.7 KB
.../resources/META-INF/asciidoc/user-guide/images/getting_started_set_password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...n-io-html/src/test/java/de/tudarmstadt/ukp/inception/io/html/MHtmlDocumentReaderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Licensed to the Technische Universität Darmstadt under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The Technische Universität Darmstadt | ||
* licenses this file to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package de.tudarmstadt.ukp.inception.io.html; | ||
|
||
import static java.nio.charset.StandardCharsets.UTF_8; | ||
import static org.apache.uima.fit.factory.CollectionReaderFactory.createReader; | ||
import static org.apache.uima.fit.factory.JCasFactory.createJCas; | ||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.assertj.core.api.Assertions.contentOf; | ||
|
||
import java.io.File; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class MHtmlDocumentReaderTest | ||
{ | ||
@Test | ||
void testMHtmlWithUtf8Encoding() throws Exception | ||
{ | ||
var baseName = "Exceptional_isomorphism_Wikipedia"; | ||
var cas = createJCas(); | ||
|
||
var sut = createReader( // | ||
MHtmlDocumentReader.class, // | ||
MHtmlDocumentReader.PARAM_SOURCE_LOCATION, | ||
"src/test/resources/mhtml/" + baseName + ".mhtml"); | ||
|
||
sut.getNext(cas.getCas()); | ||
|
||
assertThat(cas.getDocumentText()) // | ||
.isEqualTo(contentOf(new File("src/test/resources/mhtml/" + baseName + ".txt"), | ||
UTF_8)); | ||
} | ||
|
||
@Test | ||
void testMHtmlWithWindows1252Encoding() throws Exception | ||
{ | ||
var baseName = "A_KAE"; | ||
var cas = createJCas(); | ||
|
||
var sut = createReader( // | ||
MHtmlDocumentReader.class, // | ||
MHtmlDocumentReader.PARAM_SOURCE_LOCATION, | ||
"src/test/resources/mhtml/" + baseName + ".mhtml"); | ||
|
||
sut.getNext(cas.getCas()); | ||
|
||
assertThat(cas.getDocumentText()) // | ||
.isEqualTo(contentOf(new File("src/test/resources/mhtml/" + baseName + ".txt"), | ||
UTF_8)); | ||
} | ||
} |
Oops, something went wrong.