]> source.dussan.org Git - poi.git/commitdiff
additional tests for DBCS sheet name
authorAvik Sengupta <avik@apache.org>
Thu, 28 Apr 2005 13:44:06 +0000 (13:44 +0000)
committerAvik Sengupta <avik@apache.org>
Thu, 28 Apr 2005 13:44:06 +0000 (13:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353655 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls [new file with mode: 0644]
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java

diff --git a/src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls b/src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls
new file mode 100644 (file)
index 0000000..17aa944
Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls differ
index 5383b0fbd5c3e9187db428a08b5b4f5741a932d2..9afd1527860f921474bdae9a4bd713b49f3dee07 100644 (file)
@@ -396,6 +396,20 @@ public class TestHSSFSheet
         
     }
     
+    public void testDBCSName () throws Exception {
+       FileInputStream fis = null;
+        HSSFWorkbook wb     = null;
+        
+        String filename = System.getProperty("HSSF.testdata.path");
+
+        filename = filename + "/DBCSSheetName.xls";
+        fis = new FileInputStream(filename);
+        wb = new HSSFWorkbook(fis);
+        HSSFSheet s= wb.getSheetAt(1);
+        assertEquals ("DBCS Sheet Name 2", wb.getSheetName(1),"\u090f\u0915" );
+        assertEquals("DBCS Sheet Name 1", wb.getSheetName(0),"\u091c\u093e");
+    }
+       
        public static void main(java.lang.String[] args) {
                 junit.textui.TestRunner.run(TestHSSFSheet.class);
        }