sc/qa/uitest/csv_dialog/tdf39716.py |   30 ++++++++++++++++++++++++++++++
 sc/qa/uitest/data/tdf39716.csv      |    4 ++++
 2 files changed, 34 insertions(+)

New commits:
commit 618b38fb406dfc578c60f63d002ecc1cf912a901
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Mar 24 18:07:23 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Mar 24 21:08:36 2022 +0100

    tdf#39716: sc: Add UItest
    
    Change-Id: Ic28f676d14b21edc1f06b726afbcfc19c8015b68
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132081
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/uitest/csv_dialog/tdf39716.py 
b/sc/qa/uitest/csv_dialog/tdf39716.py
new file mode 100644
index 000000000000..a6c5035e38ff
--- /dev/null
+++ b/sc/qa/uitest/csv_dialog/tdf39716.py
@@ -0,0 +1,30 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from libreoffice.calc.csv_dialog import load_csv_file
+from libreoffice.calc.document import get_cell_by_position
+
+class Tdf39716(UITestCase):
+
+    def test_tdf39716(self):
+
+        with load_csv_file(self, "tdf39716.csv", True) as xDialog:
+            pass
+
+        document = self.ui_test.get_component()
+
+        # Without the fix in place, this test would have failed with
+        # AssertionError: 2.5e-13 != 0.0
+        self.assertEqual(2.5e-13, get_cell_by_position(document, 0, 0, 
0).getValue())
+        self.assertEqual(5e-13, get_cell_by_position(document, 0, 0, 
1).getValue())
+        self.assertEqual(7.5e-13, get_cell_by_position(document, 0, 0, 
2).getValue())
+        self.assertEqual(1e-12, get_cell_by_position(document, 0, 0, 
3).getValue())
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf39716.csv b/sc/qa/uitest/data/tdf39716.csv
new file mode 100644
index 000000000000..e400e6110895
--- /dev/null
+++ b/sc/qa/uitest/data/tdf39716.csv
@@ -0,0 +1,4 @@
+2.5E-13
+5E-13
+7.5E-13
+1E-12

Reply via email to