diff --git a/src/testcases/org/apache/poi/hssf/HSSFTests.java b/src/testcases/org/apache/poi/hssf/HSSFTests.java index 0a4fa66af..ff15491d9 100644 --- a/src/testcases/org/apache/poi/hssf/HSSFTests.java +++ b/src/testcases/org/apache/poi/hssf/HSSFTests.java @@ -22,6 +22,7 @@ import junit.framework.TestSuite; import org.apache.poi.hssf.eventmodel.TestEventRecordFactory; import org.apache.poi.hssf.eventmodel.TestModelFactory; +import org.apache.poi.hssf.eventusermodel.AllEventUserModelTests; import org.apache.poi.hssf.model.AllModelTests; import org.apache.poi.hssf.record.AllRecordTests; import org.apache.poi.hssf.usermodel.AllUserModelTests; @@ -48,6 +49,7 @@ public final class HSSFTests { TestSuite suite = new TestSuite("Tests for org.apache.poi.hssf"); // $JUnit-BEGIN$ + suite.addTest(AllEventUserModelTests.suite()); suite.addTest(AllModelTests.suite()); suite.addTest(AllUserModelTests.suite()); suite.addTest(AllRecordTests.suite()); diff --git a/src/testcases/org/apache/poi/hssf/eventusermodel/AllEventUserModelTests.java b/src/testcases/org/apache/poi/hssf/eventusermodel/AllEventUserModelTests.java new file mode 100644 index 000000000..41e3b8632 --- /dev/null +++ b/src/testcases/org/apache/poi/hssf/eventusermodel/AllEventUserModelTests.java @@ -0,0 +1,38 @@ +/* ==================================================================== + 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.hssf.eventusermodel; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * Collects all tests for org.apache.poi.hssf.eventusermodel. + * + * @author Josh Micich + */ +public class AllEventUserModelTests { + + public static Test suite() { + TestSuite result = new TestSuite(AllEventUserModelTests.class.getName()); + result.addTestSuite(TestEventWorkbookBuilder.class); + result.addTestSuite(TestFormatTrackingHSSFListener.class); + result.addTestSuite(TestHSSFEventFactory.class); + result.addTestSuite(TestMissingRecordAwareHSSFListener.class); + return result; + } +} diff --git a/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java b/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java index adf084331..215732deb 100644 --- a/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java +++ b/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java @@ -134,7 +134,7 @@ public final class TestEventWorkbookBuilder extends TestCase { fr = (FormulaRecord)mockListen._frecs.get(5); assertEquals(6, fr.getRow()); assertEquals(0, fr.getColumn()); - assertEquals("SUM('Sh3'!A1:A4)", FormulaParser.toFormulaString(stubHSSF, fr.getParsedExpression())); + assertEquals("SUM(Sh3!A1:A4)", FormulaParser.toFormulaString(stubHSSF, fr.getParsedExpression())); // Now, load via Usermodel and re-check @@ -142,7 +142,7 @@ public final class TestEventWorkbookBuilder extends TestCase { POIFSFileSystem fs = new POIFSFileSystem(is); HSSFWorkbook wb = new HSSFWorkbook(fs); assertEquals("Sheet1!A1", wb.getSheetAt(0).getRow(1).getCell(0).getCellFormula()); - assertEquals("SUM('Sh3'!A1:A4)", wb.getSheetAt(0).getRow(6).getCell(0).getCellFormula()); + assertEquals("SUM(Sh3!A1:A4)", wb.getSheetAt(0).getRow(6).getCell(0).getCellFormula()); } private static final class MockHSSFListener implements HSSFListener { diff --git a/src/testcases/org/apache/poi/hssf/record/formula/TestSheetNameFormatter.java b/src/testcases/org/apache/poi/hssf/record/formula/TestSheetNameFormatter.java index b6dd1970e..369c09583 100644 --- a/src/testcases/org/apache/poi/hssf/record/formula/TestSheetNameFormatter.java +++ b/src/testcases/org/apache/poi/hssf/record/formula/TestSheetNameFormatter.java @@ -71,6 +71,7 @@ public final class TestSheetNameFormatter extends TestCase { confirmCellNameMatch("aa1", true); confirmCellNameMatch("A1A", false); confirmCellNameMatch("A1A1", false); + confirmCellNameMatch("Sh3", false); confirmCellNameMatch("SALES20080101", false); // out of range }