diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-15 09:26:45 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-18 17:25:37 -0500 |
commit | b7fd06bf98fea63aab368b4d0968811bdec395c6 (patch) | |
tree | 765be61c1735fd7f6f34b83da6a81e840fc27990 | |
parent | 6d9026f7a7ebad02b57fcd2dd15f66adeba361af (diff) |
Test correct quoting of sheet names.
Change-Id: I4e0c55b286a476aff5cf9198b2527ec068003a8c
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index c780717fed8c..1f867f172ed7 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -32,11 +32,22 @@ using namespace formula; void Test::testFormulaCreateStringFromTokens() { - m_pDoc->InsertTab(0, "Test"); + OUString aTabName1("Test"); + OUString aTabName2("Kevin's Data"); + OUString aTabName3("Past Data"); + OUString aTabName4("2013"); + m_pDoc->InsertTab(0, aTabName1); + m_pDoc->InsertTab(1, aTabName2); + m_pDoc->InsertTab(2, aTabName3); + m_pDoc->InsertTab(3, aTabName4); const char* aTests[] = { "1+2", - "SUM(A1:A10;B1:B10;C5;D6)" + "SUM(A1:A10;B1:B10;C5;D6)", + "IF(Test.B10<>10;\"Good\";\"Bad\")", + "AVERAGE('2013'.B10:C20)", + "'Kevin''s Data'.B10", + "'Past Data'.B1+'2013'.B2*(1+'Kevin''s Data'.C10)" }; boost::scoped_ptr<ScTokenArray> pArray; @@ -57,6 +68,9 @@ void Test::testFormulaCreateStringFromTokens() CPPUNIT_ASSERT_EQUAL(aFormula, aCheck); } + m_pDoc->DeleteTab(3); + m_pDoc->DeleteTab(2); + m_pDoc->DeleteTab(1); m_pDoc->DeleteTab(0); } |