diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-07-05 16:11:27 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-07-05 17:35:30 +0200 |
commit | c6cc94ea781699b899ad92ca6ceab2e8f59d1606 (patch) | |
tree | daec8c9be59250d58a7a5424cfc85fdcbfffbd96 /basic/qa/basic_coverage | |
parent | b1a171c95531bda12d43bba81fa00d02ba3146a7 (diff) |
tdf#134692: basic_macros: Add unittest
Change-Id: I9115eca2fce784cd55a8eb4f1cfd6e614fd3612b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118442
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'basic/qa/basic_coverage')
-rw-r--r-- | basic/qa/basic_coverage/test_tdf134692.bas | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/basic/qa/basic_coverage/test_tdf134692.bas b/basic/qa/basic_coverage/test_tdf134692.bas new file mode 100644 index 000000000000..b3ff937e7d9b --- /dev/null +++ b/basic/qa/basic_coverage/test_tdf134692.bas @@ -0,0 +1,29 @@ +Option VBASupport 0 + +Function doUnitTest() As String + TestUtil.TestInit + verify_tdf134692 + doUnitTest = TestUtil.GetResult() +End Function + +Sub verify_tdf134692() + On Error GoTo errorHandler + + dim a(2 to 5) + b = a + redim preserve b(4 to 6) + for i = lbound(b) to ubound(b) + b(i) = i + next i + for i = lbound(a) to ubound(a) + s$ = s$ & " a(" & i & ")=" & a(i) + next i + for i = lbound(b) to ubound(b) + s$ = s$ & " b(" & i & ")=" & b(i) + next i + TestUtil.AssertEqual(s$, " a(2)= a(3)= a(4)= a(5)= b(4)=4 b(5)=5 b(6)=6", "tdf#134692: " & retStr) + + Exit Sub +errorHandler: + TestUtil.ReportErrorHandler("verify_tdf134692", Err, Error$, Erl) +End Sub |