aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2017-01-12 10:39:26 +0000
committerJaven O'Neal <onealj@apache.org>2017-01-12 10:39:26 +0000
commitbdc2e2fe04bcf322d790c1c633fcc4c392b07458 (patch)
treec31e03d08cd69b912130775f5cf1407705ee3244 /src/testcases
parent7e74976c04fb51724dff868585cecd63b3e9338b (diff)
downloadpoi-bdc2e2fe04bcf322d790c1c633fcc4c392b07458.tar.gz
poi-bdc2e2fe04bcf322d790c1c633fcc4c392b07458.zip
bug 60260: parse unicode sheet names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1778418 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java
index 1bb73f9f5e..74b5a5fac1 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java
@@ -31,6 +31,7 @@ import java.util.List;
import org.apache.poi.ss.ITestDataProvider;
import org.apache.poi.ss.util.AreaReference;
import org.apache.poi.ss.util.CellReference;
+import org.apache.poi.util.IOUtils;
import org.junit.Test;
/**
@@ -737,4 +738,18 @@ public abstract class BaseTestNamedRange {
}
}
+
+ // bug 60260: renaming a sheet with a named range referring to a unicode (non-ASCII) sheet name
+ @Test
+ public void renameSheetWithNamedRangeReferringToUnicodeSheetName() {
+ Workbook wb = _testDataProvider.createWorkbook();
+ wb.createSheet("Sheet\u30FB1");
+
+ Name name = wb.createName();
+ name.setNameName("test_named_range");
+ name.setRefersToFormula("'Sheet\u30FB201'!A1:A6");
+
+ wb.setSheetName(0, "Sheet 1");
+ IOUtils.closeQuietly(wb);
+ }
}