diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2025-01-06 15:16:40 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2025-01-08 06:02:43 +0100 |
commit | f8ac9d3311a623fdca64583b08780ea8ebed157c (patch) | |
tree | ecdc50de7988bf8c1790a04679cce49f67bbccc2 /basic/qa | |
parent | 20db60030eaa9a2bc099894d89a63808e12c7635 (diff) |
tdf#164599: Allow space between sign and number in VBASupport mode
Change-Id: Ib9e8c8770f8c2d1b348ff032502467915829c4f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179865
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/qa')
-rw-r--r-- | basic/qa/basic_coverage/test_isnumeric_method.bas | 2 | ||||
-rw-r--r-- | basic/qa/vba_tests/isnumeric.vb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/basic/qa/basic_coverage/test_isnumeric_method.bas b/basic/qa/basic_coverage/test_isnumeric_method.bas index 21e4a91a8b45..eb476e8a6b35 100644 --- a/basic/qa/basic_coverage/test_isnumeric_method.bas +++ b/basic/qa/basic_coverage/test_isnumeric_method.bas @@ -28,7 +28,7 @@ Sub verify_IsNumeric TestUtil.Assert(Not IsNumeric(" "), "Not IsNumeric("" "")") TestUtil.Assert(Not IsNumeric(" + "), "Not IsNumeric("" + "")") TestUtil.Assert(Not IsNumeric(" - "), "Not IsNumeric("" - "")") - ' Note: the two following tests should behave different in VBA (TODO/FIXME); + ' Note: the two following tests behave different in VBA; ' should it be unified maybe in non-VBA, too (a breaking change)? TestUtil.Assert(Not IsNumeric(" + 0 "), "Not IsNumeric("" + 0 "")") TestUtil.Assert(Not IsNumeric(" - 0 "), "Not IsNumeric("" - 0 "")") diff --git a/basic/qa/vba_tests/isnumeric.vb b/basic/qa/vba_tests/isnumeric.vb index ead7e83e1494..721a2fb7f4b6 100644 --- a/basic/qa/vba_tests/isnumeric.vb +++ b/basic/qa/vba_tests/isnumeric.vb @@ -26,6 +26,14 @@ rem TestUtil.Assert(IsNumeric(True), "IsNumeric(True)") TestUtil.Assert(IsNumeric("123"), "IsNumeric(""123"")") TestUtil.Assert(IsNumeric("+123"), "IsNumeric(""+123"")") + TestUtil.Assert(Not IsNumeric(""), "Not IsNumeric("""")") + TestUtil.Assert(Not IsNumeric(" "), "Not IsNumeric("" "")") + TestUtil.Assert(Not IsNumeric(" + "), "Not IsNumeric("" + "")") + TestUtil.Assert(Not IsNumeric(" - "), "Not IsNumeric("" - "")") + + TestUtil.Assert(IsNumeric(" + 0 "), "IsNumeric("" + 0 "")") + TestUtil.Assert(IsNumeric(" - 0 "), "IsNumeric("" - 0 "")") + Exit Sub errorHandler: TestUtil.ReportErrorHandler("verify_testIsNumeric", Err, Error$, Erl) |