aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java b/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
index 3503757a99..9fe7c5e67e 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
@@ -1084,6 +1084,16 @@ extends TestCase {
assertEquals("String Cell value","XYZ",c.getStringCellValue());
}
+ /** test for bug 34021*/
+ public void testComplexSheetRefs () throws IOException {
+ HSSFWorkbook sb = new HSSFWorkbook();
+ HSSFSheet s1 = sb.createSheet("Sheet a.1");
+ HSSFSheet s2 = sb.createSheet("Sheet.A");
+ s2.createRow(1).createCell((short) 2).setCellFormula("'Sheet a.1'!A1");
+ s1.createRow(1).createCell((short) 2).setCellFormula("'Sheet.A'!A1");
+ File file = TempFile.createTempFile("testComplexSheetRefs",".xls");
+ sb.write(new FileOutputStream(file));
+ }
public static void main(String [] args) {
System.out
.println("Testing org.apache.poi.hssf.usermodel.TestFormulas");