From: Avik Sengupta Date: Thu, 28 Apr 2005 13:44:06 +0000 (+0000) Subject: additional tests for DBCS sheet name X-Git-Tag: BEFORE_RICHTEXT~112 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=52cdc2142f3076f9f6d61e30ff528eca823d9f5b;p=poi.git additional tests for DBCS sheet name git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353655 13f79535-47bb-0310-9956-ffa450edef68 --- 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 index 0000000000..17aa94475e Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls differ diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java index 5383b0fbd5..9afd152786 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java @@ -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); }