From ec5e6acbf3e97b3e2e7ae47cc4b3d0b4b96e6ed8 Mon Sep 17 00:00:00 2001 From: Avik Sengupta Date: Fri, 22 Apr 2005 13:12:14 +0000 Subject: [PATCH] testcase for bug 34021 , already worked fine git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353647 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/usermodel/TestFormulas.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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"); -- 2.39.5