| 1 |
' This file is part of the LibreOffice project. |
| 2 |
' |
| 3 |
' This Source Code Form is subject to the terms of the Mozilla Public |
| 4 |
' License, v. 2.0. If a copy of the MPL was not distributed with this |
| 5 |
' file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 6 |
' |
| 7 |
|
| 8 |
Option VBASupport 0 |
| 9 |
Option Explicit |
| 10 |
|
| 11 |
Function doUnitTest() As String |
| 12 |
TestUtil.TestInit |
| 13 |
verify_tdf134692 |
| 14 |
doUnitTest = TestUtil.GetResult() |
| 15 |
End Function |
| 16 |
|
| 17 |
Sub verify_tdf134692() |
| 18 |
On Error GoTo errorHandler |
| 19 |
|
| 20 |
dim a(2 to 5) |
| 21 |
dim b, i, s |
| 22 |
b = a |
| 23 |
redim preserve b(4 to 6) |
| 24 |
for i = lbound(b) to ubound(b) |
| 25 |
b(i) = i |
| 26 |
next i |
| 27 |
for i = lbound(a) to ubound(a) |
| 28 |
s = s & " a(" & i & ")=" & a(i) |
| 29 |
next i |
| 30 |
for i = lbound(b) to ubound(b) |
| 31 |
s = s & " b(" & i & ")=" & b(i) |
| 32 |
next i |
| 33 |
TestUtil.AssertEqual(s, " a(2)= a(3)= a(4)= a(5)= b(4)=4 b(5)=5 b(6)=6", "tdf#134692") |
| 34 |
|
| 35 |
Exit Sub |
| 36 |
errorHandler: |
| 37 |
TestUtil.ReportErrorHandler("verify_tdf134692", Err, Error$, Erl) |
| 38 |
End Sub |