Commit Graph

60 Commits

Author SHA1 Message Date
Andrea Gelmini
347c475d6d Fix typos in code
"modifiedTimout" doesn't exist

Change-Id: If0576c2f286124f8afa39cd70ab563cee1919237
Reviewed-on: https://gerrit.libreoffice.org/78265
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-31 14:35:15 +02:00
Mike Kaganski
26378cf9b5 Small cleanup
Change-Id: I0d3cea810b9148859d1c0704e06381f22d7b24c9
Reviewed-on: https://gerrit.libreoffice.org/56762
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-30 19:14:18 +02:00
Mike Kaganski
0f7a7c8e71 tdf#118218: Implement FormatNumber VBA function
The existing unit test (previously non-functional because of defunct
success condition) is fixed and extended.

Change-Id: I2544f865144b25f51a5f0941e5d961f246f41c4b
Reviewed-on: https://gerrit.libreoffice.org/56610
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-29 21:06:12 +02:00
Zdeněk Crhonek
c5417a21f5 VBA tests (4) - don't pass when all tests fail
Change-Id: Ib4f9b5df1cffe104ba27be95183d075f24f28bb3
Reviewed-on: https://gerrit.libreoffice.org/45774
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-23 12:48:39 +01:00
Zdeněk Crhonek
baaf6c12c8 VB tests (3)-don't pass whe all tests fail
Change-Id: I7dd99a43a3d41c8ca31a070028a19bd032d06435
Reviewed-on: https://gerrit.libreoffice.org/45739
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-22 00:04:01 +01:00
Zdeněk Crhonek
00b644e88c VBA test - error() function
Change-Id: Ia667342f9112932c71df593f08371d3c35255b19
Reviewed-on: https://gerrit.libreoffice.org/45917
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-07 17:46:49 +01:00
Zdeněk Crhonek
86393f0370 VBA test - iserror function test repair, tdf#114232
Change-Id: I924713f360a41fa5b269468fdf771df6a50df44b
Reviewed-on: https://gerrit.libreoffice.org/45923
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-06 12:03:22 +01:00
Zdeněk Crhonek
2bfbe3492d VBA tests repair (2) - don't pass the test when all tests fail
Change-Id: I2519fc54e2ce74ec3c6777aa002971548a21c3c6
Reviewed-on: https://gerrit.libreoffice.org/45715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-02 22:47:50 +01:00
Zdeněk Crhonek
9d3b73c835 VBA tests - repair tests (Don't pass when all tests fail)
Change-Id: I70bfb8b909f9f7033cd1eb374db0fe710fd2a0c3
Reviewed-on: https://gerrit.libreoffice.org/45260
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-12-02 17:48:52 +01:00
Eike Rathke
2408a1b1de Don't pass the test when all tests fail
Due to the locale dependent date format used here in strings that
neither matches en-US nor en-GB (in which the tests seem to be
executed) all tests failed, and then with passCount==0 the check
was

    If failCount <> 0 And passCount > 0 Then

instead of

    If failCount <> 0 Or passCount = 0 Then

so the end result was OK.

Also fixed the one case that was commented with
Rem why this fails in excel?
It actually also failed for us, just that because all tests failed
(see above) it never seemed to fail..
Problem seems to be the accuracy of the underlying date+time
double for this specific calculation. Good to know it happens in
Excel as well ;-)
As a workaround, conversion to string does the necessary rounding
internally.

Change-Id: If0302b2feab9e1233d66da4eccff732f61542a69
Reviewed-on: https://gerrit.libreoffice.org/45196
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-11-24 12:01:41 +01:00
Tor Lillqvist
66b3970c94 Seems that testMiscOLEStuff() works only as 64-bit on a current Windows 10
Change-Id: Ib43f8c185d2a2e9e93f34d918d6f9461586cf6a6
2017-10-17 18:57:54 +03:00
Zdeněk Crhonek
74da6d5f9f VBA tests-add VAL,VARTYPE,WEEKDAY,WEEKDAYNAME,YEAR tests
Change-Id: I3f1803617a2bdeaab9922ebb375ec4fd67318d20
Reviewed-on: https://gerrit.libreoffice.org/41499
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-24 12:55:26 +02:00
Andrea Gelmini
64a3124d92 Fix typos
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3
Reviewed-on: https://gerrit.libreoffice.org/41194
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-17 21:53:28 +02:00
Zdeněk Crhonek
57ece564ac VBA functions tests-SYD, TIMESERIAL, TIMEVALUE, TRIM, TYPENAME, UBOUND,UCASE
Change-Id: I7ea7757291d996375584ef05d822701737020b1c
Reviewed-on: https://gerrit.libreoffice.org/40894
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-08 19:36:00 +02:00
Zdeněk Crhonek
f060d64507 VBA tests- add functions STRING,STRREVERSE,SWITCH
Change-Id: Ibba3b5cabee31af44f0e8dda5a11f152ab0cfe01
Reviewed-on: https://gerrit.libreoffice.org/40730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-03 21:29:30 +02:00
Zdeněk Crhonek
3acfc281ad VBA tests - STR and STRCOMP functions
Change-Id: I09daaa8be3687bf838f569849542d47c85907d1e
Reviewed-on: https://gerrit.libreoffice.org/40687
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-02 21:51:55 +02:00
Zdeněk Crhonek
fae4b84882 VBA tests-functions RIGHT,RTRIM,SECOND,SGN,SIN,SLN,SPACE,SQR
Change-Id: I0db9233f20fccbc4b2c4f4b3e36cf0aaa8583c99
Reviewed-on: https://gerrit.libreoffice.org/40339
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-07-24 18:05:44 +02:00
Zdeněk Crhonek
ad17c13cf1 VBA test - add RATE, RGB functions
Change-Id: I284597a54067049479c56d6e6eea6322f0e3ee2b
Reviewed-on: https://gerrit.libreoffice.org/39377
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-06-29 15:51:42 +02:00
Takeshi Abe
dc36d07d9e basic: Drop unused variables in test scripts
Change-Id: I9893e8bed254dcac91fbc7abb5ab4817a28ba339
Reviewed-on: https://gerrit.libreoffice.org/38133
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-05-30 01:19:45 +02:00
Zdeněk Crhonek
f15afbcbb2 add VBA tests- PMT, PPMT, PV,QBCOLOR functions
Change-Id: Idcbecbdee6a6c054886d6a11ce22e525ecf23736
Reviewed-on: https://gerrit.libreoffice.org/38084
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-05-27 21:01:06 +02:00
Takeshi Abe
2acc4dc6a9 basic: Fix broken unit test for IsMissing()
Change-Id: Ia6fb2622c85686a50701d4c37356e608a3df653b
Reviewed-on: https://gerrit.libreoffice.org/37775
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-05-19 10:32:36 +02:00
Takeshi Abe
9fb691adb4 basic: Fix broken unit test for Join()
Change-Id: Ib9768097d73fe664e24da4c3989141e87342a34e
Reviewed-on: https://gerrit.libreoffice.org/37711
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-05-18 12:13:34 +02:00
Takeshi Abe
6c2a10e1d0 basic: Fix broken test for VBA's LCase
Change-Id: Icdbe62d4faa04b59a5cc11ea8f72f5e88f664a6d
Reviewed-on: https://gerrit.libreoffice.org/37682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-17 10:30:19 +02:00
Takeshi Abe
666901bc82 basic: Test VBA's CDec() only on Windows
since it is not implemented on others.

Change-Id: If058207eb441caa65f93bbb554fe77cf469b1682
Reviewed-on: https://gerrit.libreoffice.org/37631
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-05-16 05:19:17 +02:00
Takeshi Abe
b9d75dea30 basic: Fix broken logic in VBA's unit tests
It should not be "OK" when no assertion passes.

Change-Id: Ib6bab2d597a138468e96b4acf8c3be7abd112cca
Reviewed-on: https://gerrit.libreoffice.org/37540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-05-15 04:59:04 +02:00
Takeshi Abe
f99c95c80d basic: Fix VBA constant vbNewLine with unit test
... making its value CRLF on Windows and LF on others.

A winding road of regressions passed through it;
first b680e35254,
then 7beeced463.

Change-Id: I9e4da4a17436949b4fea35481b8355b4321cb268
Reviewed-on: https://gerrit.libreoffice.org/37500
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-05-15 04:57:59 +02:00
Zdeněk Crhonek
3cb581adde VBA tests- MONTHNAME,NPER, NPV,OCT test case
Change-Id: Ia6c732d4c205ba2461007feacce1403b83e6043b
Reviewed-on: https://gerrit.libreoffice.org/37109
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-05-03 20:14:27 +02:00
Zdeněk Crhonek
377d2d4bed add VBA test cases
functions  - LEFT, LEN, LOG, LTRIM,
MID, MINUTE, MIRR, MONTH

Change-Id: Ifa4c6c1b715772644afc4280379b2a9e8429842f
Reviewed-on: https://gerrit.libreoffice.org/36551
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-16 18:01:59 +02:00
Zdeněk Crhonek
31dc11e7e3 add VBA test cases
tests:  ISARRAY, ISDATE, ISEMPTY, ISERROR, ISMISSING,
ISNULL, ISNUMERIC, ISOBJECT, JOIN, LBOUND, LCASE

Change-Id: I0b0dacd0d62bf00680f33866ce7ec0152eec27e0
Reviewed-on: https://gerrit.libreoffice.org/36509
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-13 14:22:23 +02:00
Zdeněk Crhonek
ed4473abc1 VBA tests - INSTRREV, INT test case
Change-Id: I220b8dd57927486b697b46777e20db7d2f53e487
Reviewed-on: https://gerrit.libreoffice.org/36486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-13 09:54:18 +02:00
Zdeněk Crhonek
d89a421352 VBA tests - HEX, HOUR, IIF, INSTR test cases
Change-Id: Ib9e05dcfbd72f56cb3b5fb4e4760f868c008c7ac
Reviewed-on: https://gerrit.libreoffice.org/36315
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-09 15:42:50 +02:00
Zdeněk Crhonek
6c34c5ff46 VBA tests - FORMATNUMBER function
Change-Id: Ibfb00e5be9a32e3767ec4e73cdbf81f53f07b42e
Reviewed-on: https://gerrit.libreoffice.org/36229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-09 07:27:05 +02:00
Zdeněk Crhonek
d9dc5dcd39 add VBA tests- FIX,EXP,ERROR,DAY functions
Change-Id: I339abf03f88a0b8135184a892f5200ad381310bd
Reviewed-on: https://gerrit.libreoffice.org/36010
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-02 11:02:27 +00:00
Zdeněk Crhonek
a2c746ecd8 VBA tests - add DATEDIFF and DATEPART test case
Change-Id: I3d0026e707369e435013be1d11e1366a77ff2d0b
Reviewed-on: https://gerrit.libreoffice.org/35881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-29 21:01:48 +00:00
Zdeněk Crhonek
1e02750ef2 VBA tests - add CVDATE,CVERR,DATEADD test case
Change-Id: Ib6b79eb3a3daf22dd4f15427a3e8547300f8b8f9
Reviewed-on: https://gerrit.libreoffice.org/35403
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-18 16:26:09 +00:00
Zdeněk Crhonek
7ea2962e76 VBA tests - add CSNG, CSTR test case
Change-Id: I5e9bc24bb89cc634a3c01e8c8b23a19927e7010c
Reviewed-on: https://gerrit.libreoffice.org/35341
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-17 17:39:13 +00:00
Zdeněk Crhonek
c0ed8e9537 add VBA test CINT,CLNG functions tests
Change-Id: I69f0144006e4ed226e8b158c0cc9f60dda0a9184
Reviewed-on: https://gerrit.libreoffice.org/35060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-11 06:16:58 +00:00
Zdeněk Crhonek
1577f01b29 add VBA COS function test case
Change-Id: I9014e068576d68613da6a70526dcb5b8e278e3f1
Reviewed-on: https://gerrit.libreoffice.org/35027
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-10 20:18:41 +00:00
Zdeněk Crhonek
8528712b6e VBA test CHOOSE function
Change-Id: Ieb76595199ea1f6c23924d4860228fe5f4d30df1
Reviewed-on: https://gerrit.libreoffice.org/34909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-06 05:43:29 +00:00
Zdeněk Crhonek
ed0e8f970f VBA test CDATE, CDBL function
Change-Id: Id45930e6d329a0b1142bfde612c1a089390e4817
Reviewed-on: https://gerrit.libreoffice.org/34868
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-04 09:20:02 +00:00
Andrea Gelmini
0a850f3e15 Fix typos
Change-Id: Iaefa094c82006346897f5563ac3ddcdc60ab68a3
Reviewed-on: https://gerrit.libreoffice.org/34809
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:47:54 +00:00
Zdeněk Crhonek
38f13e4dca add VBA functions tests - ABS,ARRAY, ASC, ATN, CBOOL
Change-Id: I8a0b8b833ba32b9d27773748b3bbd8bbc07d1959
Reviewed-on: https://gerrit.libreoffice.org/34696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-01 05:16:52 +00:00
Zdeněk Crhonek
b5c83cf676 add VBA CHR() test case
Change-Id: I9e7aefdd0309fd4f209fba6fb4f698b098856d01
Reviewed-on: https://gerrit.libreoffice.org/34133
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-27 20:37:36 +00:00
Mike Kaganski
5ecd7ebbdf Partially fix VBATest::testMiscOLEStuff for Win64
On Windows x64 there are two ODBCs - one for each bitness.
A 64-bit build gets 64-bit ODBC, and there is no provider named
"Microsoft Excel Driver (*.xls)", no normally the test is simply
skipped. But if MS Excel is installed, then it installs provider
"Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)", that was
detected by previous code, but not used inside the VBAs. So, VBAs
tried to use "Microsoft Excel Driver (*.xls)" unavailable to them.

This patch allows using Excel's provider as well, thus allowing
developer to test against 64-bit-specific regressions.

However, the last test uses Microsoft.Jet.OLEDB.4.0 provider,
that is unavailable on Win64. There are substitutions -
Microsoft.ACE.OLEDB.12.0 and Microsoft.ACE.OLEDB.15.0,
but there is no easy way to test if they are installed. Thus,
that test is disabled on Win64 for now.

Also, possible buffer overflow fixed, when byte count was passed
to SQLGetInstalledDriversW instead of char count.

Change-Id: Ib5c55251f0e92b3078a46aee173b5061439445ae
Reviewed-on: https://gerrit.libreoffice.org/32019
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-14 19:03:56 +00:00
Laurent Balland-Poirier
d977a49ef0 tdf#40517 Unit test for question marks in number format
Unit test for https://gerrit.libreoffice.org/21021/

Add unit test for Engineering format
Add unit test for optional sign in exponent

Change-Id: I958ccdcc68a4e496cbd4bdc74d0650c133f3a3f7
Reviewed-on: https://gerrit.libreoffice.org/21824
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-17 08:53:33 +00:00
Eike Rathke
1da0c806d5 remove trailing blanks rubbish
Change-Id: I97cee7ea1d63375b73f0d4003022e9f09ad38e5f
2015-03-23 09:40:26 +00:00
Eike Rathke
e19a11c788 more engineering notation format tests, tdf#30716
Change-Id: Iefb035af9258c21e4fcc7f9b997f40ec318ed1ff
2015-03-23 09:26:35 +00:00
Laurent Balland-Poirier
86a318ce62 tdf#30716 Engineering notation
Implement engineering notation: fomat ##0.00E+00 for instance
Saved in ODF thanks to https://gerrit.libreoffice.org/14875/

Change-Id: I1e401183a95ce05481a9af52e49bbcfe08cd1a20
Reviewed-on: https://gerrit.libreoffice.org/14886
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2015-03-23 09:21:59 +00:00
Tsutomu Uchino
bf964151a7 Related: #i94895# revert the part of revision 1650261
replaced string should be starting with the start postion if specified

(cherry picked from commit 68c6265584fb6cb0469098507dd287e6e1127324)

Conflicts:
	basic/source/runtime/methods.cxx

Change-Id: Ib729facfa78ffddebc258440324f05d037fae46f
2015-01-11 20:45:28 +00:00
Caolán McNamara
476f75802a Resolves: #i94895# fix illegal result of Replace runtime function"
and adjust the basic test-case, which is surely wrong

The syntax for REPLACE is:

// Replace(expression, find, replace[, start[, count[, compare]]])

surely in the case of a start of 3 the preceeding chars should
be returned unchanged in the result, not stripped off as before
this change.

This reverts commit 869402a587.

Change-Id: Ie710e4de9e7e35c84abe2770142a963532820af4
2015-01-09 12:05:37 +00:00