]> source.dussan.org Git - poi.git/commitdiff
Testcase for bug 15353
authorAvik Sengupta <avik@apache.org>
Mon, 6 Oct 2003 10:20:33 +0000 (10:20 +0000)
committerAvik Sengupta <avik@apache.org>
Mon, 6 Oct 2003 10:20:33 +0000 (10:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353375 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

index 1e35b5d9591a774b719e5712e219f39d69749f7e..45adf4dedf1548f3775a78c727fbbdc6b019f8f4 100644 (file)
@@ -123,5 +123,23 @@ extends TestCase {
                  out.close();
                  }
 
-
+  /* test hyperlinks
+      * open resulting file in excel, and check that there is a link to Google
+      **/
+      public void test15353() throws Exception {
+            HSSFWorkbook wb = new HSSFWorkbook();
+            HSSFSheet sheet = wb.createSheet("My sheet");
+            
+            HSSFRow row = sheet.createRow( (short) 0 );
+            HSSFCell cell = row.createCell( (short) 0 );
+            cell.setCellFormula("HYPERLINK(\"http://google.com\",\"Google\")");
+            
+            // Write out the workbook
+            File f = File.createTempFile("test15353",".xls");
+            FileOutputStream fileOut = new FileOutputStream(f);
+            wb.write(fileOut);
+            fileOut.close();
+        }
+          
+          
 }