diff options
Diffstat (limited to 'sc/qa/unit/ucalc_formula.cxx')
-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); |