diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-08 18:01:08 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-08 18:21:48 -0500 |
commit | c4987cd730be2d4aa7c76e69fad4e3195413fb0c (patch) | |
tree | 611adf3825599388cc1df729745b3fce6f7664d2 | |
parent | c96d1ddf579fdce1e0afa8b7804d081e631deb22 (diff) |
fdo#74512: Add test for this.
Change-Id: I472a91375c6408761d9c300b3575cfe101649fca
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 411ed9ee474b..05ff6b6bd87e 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -217,6 +217,26 @@ void Test::testFormulaParseReference() m_pDoc->GetName(4, aTabName); CPPUNIT_ASSERT_EQUAL(aTab4, aTabName); + // Make sure the formula input and output match. + { + const char* aChecks[] = { + "'90''s Music'.B12", + "'90''s and 70''s'.$AB$100", + "'All Others'.Z$100", + "NoQuote.$C111" + }; + + for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i) + { + // Use the 'Dummy' sheet for this. + OUString aInput("="); + aInput += OUString::createFromAscii(aChecks[i]); + m_pDoc->SetString(ScAddress(0,0,0), aInput); + if (!checkFormula(*m_pDoc, ScAddress(0,0,0), aChecks[i])) + CPPUNIT_FAIL("Wrong formula"); + } + } + ScAddress aPos; ScAddress::ExternalInfo aExtInfo; sal_uInt16 nRes = aPos.Parse("'90''s Music'.D10", m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); |