summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2008-02-20 19:22:50 +0000
committerMiroslav Šulc <fordfrog@gentoo.org>2008-02-20 19:22:50 +0000
commit7fdad1f170b60652b7086c97f622b964784998f5 (patch)
treea60bab26ec68386c263b7ae17bf778253df9c0c6 /dev-java/poi
parentadd ESVN_SWITCH_CMD and use svn switch as necessary (diff)
downloadgentoo-2-7fdad1f170b60652b7086c97f622b964784998f5.tar.gz
gentoo-2-7fdad1f170b60652b7086c97f622b964784998f5.tar.bz2
gentoo-2-7fdad1f170b60652b7086c97f622b964784998f5.zip
Fixed error in tests caused by applying patch that fixes determination of date/time formats in cells
(Portage version: 2.1.4.4)
Diffstat (limited to 'dev-java/poi')
-rw-r--r--dev-java/poi/ChangeLog7
-rw-r--r--dev-java/poi/files/poi-3.0.2-isADateFormatTest.patch45
-rw-r--r--dev-java/poi/poi-3.0.2-r1.ebuild5
3 files changed, 54 insertions, 3 deletions
diff --git a/dev-java/poi/ChangeLog b/dev-java/poi/ChangeLog
index 963888aefb7f..0beac8dc6071 100644
--- a/dev-java/poi/ChangeLog
+++ b/dev-java/poi/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-java/poi
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/poi/ChangeLog,v 1.43 2008/02/07 12:02:40 fordfrog Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/poi/ChangeLog,v 1.44 2008/02/20 19:22:49 fordfrog Exp $
+
+ 20 Feb 2008; Miroslav Šulc <fordfrog@gentoo.org>
+ +files/poi-3.0.2-isADateFormatTest.patch, poi-3.0.2-r1.ebuild:
+ Fixed error in tests caused by applying patch that fixes determination of
+ date/time formats in cells
*poi-3.0.2-r1 (07 Feb 2008)
diff --git a/dev-java/poi/files/poi-3.0.2-isADateFormatTest.patch b/dev-java/poi/files/poi-3.0.2-isADateFormatTest.patch
new file mode 100644
index 000000000000..b21c1d64316b
--- /dev/null
+++ b/dev-java/poi/files/poi-3.0.2-isADateFormatTest.patch
@@ -0,0 +1,45 @@
+--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java 2007/12/04 17:06:57 601004
++++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java 2008/02/07 12:39:12 619382
+@@ -228,6 +228,7 @@
+ "yyyy-mm-dd", "yyyy/mm/dd", "yy/mm/dd", "yy/mmm/dd",
+ "dd/mm/yy", "dd/mm/yyyy", "dd/mmm/yy",
+ "dd-mm-yy", "dd-mm-yyyy",
++ "DD-MM-YY", "DD-mm-YYYY",
+ "dd\\-mm\\-yy", // Sometimes escaped
+
+ // These crazy ones are valid
+@@ -242,15 +243,33 @@
+ assertTrue( HSSFDateUtil.isADateFormat(formatId, formats[i]) );
+ }
+
++ // Then time based ones too
++ formats = new String[] {
++ "yyyy-mm-dd hh:mm:ss", "yyyy/mm/dd HH:MM:SS",
++ "mm/dd HH:MM", "yy/mmm/dd SS",
++ };
++ for(int i=0; i<formats.length; i++) {
++ assertTrue( HSSFDateUtil.isADateFormat(formatId, formats[i]) );
++ }
++
+ // Then invalid ones
+ formats = new String[] {
+- "yyyy:mm:dd",
++ "yyyy*mm*dd",
+ "0.0", "0.000",
+ "0%", "0.0%",
+ "", null
+ };
+ for(int i=0; i<formats.length; i++) {
+ assertFalse( HSSFDateUtil.isADateFormat(formatId, formats[i]) );
++ }
++
++ // And these are ones we probably shouldn't allow,
++ // but would need a better regexp
++ formats = new String[] {
++ "yyyy:mm:dd",
++ };
++ for(int i=0; i<formats.length; i++) {
++ // assertFalse( HSSFDateUtil.isADateFormat(formatId, formats[i]) );
+ }
+ }
+
diff --git a/dev-java/poi/poi-3.0.2-r1.ebuild b/dev-java/poi/poi-3.0.2-r1.ebuild
index 85179bda35b6..d0f9098a4994 100644
--- a/dev-java/poi/poi-3.0.2-r1.ebuild
+++ b/dev-java/poi/poi-3.0.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/poi/poi-3.0.2-r1.ebuild,v 1.1 2008/02/07 12:02:40 fordfrog Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/poi/poi-3.0.2-r1.ebuild,v 1.2 2008/02/20 19:22:49 fordfrog Exp $
EAPI=1
JAVA_PKG_IUSE="doc examples source"
@@ -32,9 +32,10 @@ src_unpack() {
unpack ${A}
cd "${S}"
- # Patch that adds unofficial fix for detection of custom date/time formats
+ # Patch that adds official fix for detection of custom date/time formats
# See bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=44373
epatch "${FILESDIR}/${P}-isADateFormat.patch"
+ use test && epatch "${FILESDIR}/${P}-isADateFormatTest.patch"
find -name "*.jar" | xargs rm -v