Avoid potential negative array index access to cached text.
[LibreOffice.git] / sc / qa / uitest / calc_tests2 / tdf114992.py
blob6f1b888d616c0c61a7110f481e59682014b4fc33
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 from uitest.framework import UITestCase
10 from uitest.uihelper.common import get_url_for_data_file
12 #Bug: Delete a sheet in a calc document and LO crashes
14 class tdf114992(UITestCase):
15 def test_tdf114992_delete_sheet_crash(self):
16 with self.ui_test.load_file(get_url_for_data_file("tdf114992.ods")) as calc_doc:
17 self.xUITest.executeCommand(".uno:Remove")
19 self.assertEqual(calc_doc.Sheets.getCount(), 1)
20 self.xUITest.executeCommand(".uno:Undo")
21 self.assertEqual(calc_doc.Sheets.getCount(), 2)
23 # vim: set shiftwidth=4 softtabstop=4 expandtab: