diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-07-09 10:12:53 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-07-09 10:14:03 -0400 |
commit | ebc60c3297ae464898f6135e4cc5a652fb53b935 (patch) | |
tree | da60997838f04a4109de6971ab13b1f420440451 | |
parent | 99bd0d846fd2daf4905b986cae4cfb31fde04964 (diff) |
Unit test for string input with custom string handling policy.
Change-Id: I51e8fbe83e94ba66a0e2ef63aacf080ba0e50a9c
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 93e5b803c3f6..b816f5cf6e8a 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -362,6 +362,15 @@ void Test::testInput() bTest = test == "'apple'"; CPPUNIT_ASSERT_MESSAGE("Text content should have retained the first apostrophe.", bTest); + // Customized string handling policy. + ScSetStringParam aParam; + aParam.mbDetectNumberFormat = false; + aParam.mbSetTextCellFormat = true; + aParam.mbHandleApostrophe = false; + m_pDoc->SetString(0, 0, 0, "000123", &aParam); + m_pDoc->GetString(0, 0, 0, test); + CPPUNIT_ASSERT_MESSAGE("Text content should have been treated as string, not number.", test == "000123"); + m_pDoc->DeleteTab(0); } |