aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss
diff options
context:
space:
mode:
authorCédric Walter <cedricwalter@apache.org>2013-10-08 12:54:35 +0000
committerCédric Walter <cedricwalter@apache.org>2013-10-08 12:54:35 +0000
commitf9fc75461142acf8108356d84d0f1967b414ed77 (patch)
tree25021069485e262c5f5ef887a11f3d5f5f61e220 /src/testcases/org/apache/poi/ss
parent805d583babb63603041dab32eedee471bd0aad75 (diff)
downloadpoi-f9fc75461142acf8108356d84d0f1967b414ed77.tar.gz
poi-f9fc75461142acf8108356d84d0f1967b414ed77.zip
Bug 55081: patch for missing function WEEKNUM
Add simple spreadsheet with Excel 2003, and another with 2013 (both fresh files) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1530256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss')
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet.java30
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet2013.java31
2 files changed, 61 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet.java b/src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet.java
new file mode 100644
index 0000000000..77b832ea14
--- /dev/null
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet.java
@@ -0,0 +1,30 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF 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. You may obtain a copy of the License at
+
+ 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 org.apache.poi.ss.formula.functions;
+
+/**
+ * Tests WeekNum() as loaded from a test data spreadsheet.<p/>
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public class TestWeekNumFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
+
+ protected String getFilename() {
+ return "WeekNumFunctionTestCaseData.xls";
+ }
+}
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet2013.java b/src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet2013.java
new file mode 100644
index 0000000000..d7d286468a
--- /dev/null
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestWeekNumFunctionsFromSpreadsheet2013.java
@@ -0,0 +1,31 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF 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. You may obtain a copy of the License at
+
+ 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 org.apache.poi.ss.formula.functions;
+
+/**
+ * Tests WeekNum() as loaded from a test data 2013 excel spreadsheet.<p/>
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public class TestWeekNumFunctionsFromSpreadsheet2013 extends BaseTestFunctionsFromSpreadsheet {
+
+ protected String getFilename() {
+ //Only open this file with Excel 2013 to keep binary specific to that version
+ return "WeekNumFunctionTestCaseData2013.xls";
+ }
+}