aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad/testcases
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2010-04-20 12:57:27 +0000
committerYegor Kozlov <yegor@apache.org>2010-04-20 12:57:27 +0000
commitc0ffa079026170a091681c6eefb3e173e91de1eb (patch)
tree0509f3603e1ea9cf0a4a66021be6b81923a3c936 /src/scratchpad/testcases
parente75b83a2e8530e28adcd1ee193688237c317effb (diff)
downloadpoi-c0ffa079026170a091681c6eefb3e173e91de1eb.tar.gz
poi-c0ffa079026170a091681c6eefb3e173e91de1eb.zip
Fixed locale-sensitive formatters in PackagePropertiesPart, see Bugzilla 49138
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@935896 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java b/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java
index e8c9dfdc63..2a00b37fe4 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java
@@ -19,6 +19,9 @@ package org.apache.poi.hsmf.extractor;
import java.io.FileInputStream;
import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
import junit.framework.TestCase;
@@ -57,7 +60,10 @@ public final class TestOutlookTextExtractor extends TestCase {
assertEquals(-1, text.indexOf("CC:"));
assertEquals(-1, text.indexOf("BCC:"));
assertContains(text, "Subject: Test the content transformer\n");
- assertContains(text, "Date: Thu, 14 Jun 2007 09:42:55\n");
+ Calendar cal = new GregorianCalendar(2007, 5, 14, 9, 42, 55);
+ SimpleDateFormat f = new SimpleDateFormat("E, d MMM yyyy HH:mm:ss");
+ String dateText = f.format(cal.getTime());
+ assertContains(text, "Date: " + dateText + "\n");
assertContains(text, "The quick brown fox jumps over the lazy dog");
}