소스 검색

integration-tests: Enable testing extracting for OPCFileHandler and fix single test

Enable running "extract" also for OPCFileHandler
Add additional expected failures in stress.xls

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912933 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_2_5
Dominik Stadler 7 달 전
부모
커밋
a227fa9443
2개의 변경된 파일4개의 추가작업 그리고 7개의 파일을 삭제
  1. 4
    7
      poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
  2. BIN
      test-data/spreadsheet/stress.xls

+ 4
- 7
poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java 파일 보기

@@ -19,10 +19,11 @@ package org.apache.poi.stress;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.nio.file.Files;
import java.util.Set;

import org.apache.poi.openxml4j.opc.ContentTypes;
@@ -61,17 +62,13 @@ public class OPCFileHandler extends AbstractFileHandler {
}
}

@Override
public void handleExtracting(File file) {
// text-extraction is not possible currently for these types of files
}

// a test-case to test this locally without executing the full TestAllFiles
@Test
void test() throws Exception {
File file = new File("test-data/diagram/test.vsdx");

try (InputStream stream = new PushbackInputStream(new FileInputStream(file), 100000)) {
try (InputStream stream = new BufferedInputStream(
new PushbackInputStream(Files.newInputStream(file.toPath()), 100000))) {
handleFile(stream, file.getPath());
}


BIN
test-data/spreadsheet/stress.xls 파일 보기


Loading…
취소
저장