aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/poifs
diff options
context:
space:
mode:
authorTim Allison <tallison@apache.org>2016-10-18 15:47:38 +0000
committerTim Allison <tallison@apache.org>2016-10-18 15:47:38 +0000
commit1ec787c3562dcb91f1ddd8581efe393ceea75a51 (patch)
tree240755a42adb9a6344bdf440ca723c8110147bb7 /src/testcases/org/apache/poi/poifs
parent6234c859d4c93d95f97ad6f385ce950778931b96 (diff)
downloadpoi-1ec787c3562dcb91f1ddd8581efe393ceea75a51.tar.gz
poi-1ec787c3562dcb91f1ddd8581efe393ceea75a51.zip
BUG 59830 -- incorrect reading of unicode stream name
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765468 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/poifs')
-rw-r--r--src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java b/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
index 0e634b5c58..f622c54867 100644
--- a/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
+++ b/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
@@ -244,22 +244,15 @@ public class TestVBAMacroReader {
assertContains(content, testMacroNoSub);
}
- @Ignore
+
@Test
public void bug59830() throws IOException {
- // This file is intentionally omitted from the test-data directory
- // unless we can extract the vbaProject.bin from this Word 97-2003 file
- // so that it's less likely to be opened and executed on a Windows computer.
- // The file is attached to bug 59830.
- // The Macro Virus only affects Windows computers, as it makes a
- // subprocess call to powershell.exe with an encoded payload
- // The document contains macros that execute on workbook open if macros
- // are enabled
- File doc = POIDataSamples.getDocumentInstance().getFile("macro_virus.doc.do_not_open");
- VBAMacroReader reader = new VBAMacroReader(doc);
- Map<String, String> macros = reader.readMacros();
- assertNotNull(macros);
- reader.close();
+ //test file is "609751.xls" in govdocs1
+ File f = POIDataSamples.getSpreadSheetInstance().getFile("59830.xls");
+ VBAMacroReader r = new VBAMacroReader(f);
+ Map<String, String> macros = r.readMacros();
+ assertNotNull(macros.get("Module20"));
+ assertContains(macros.get("Module20"), "here start of superscripting");
}
// This test is written as expected-to-fail and should be rewritten