2 rem This file is part of the LibreOffice project.
4 rem This Source Code Form is subject to the terms of the Mozilla Public
5 rem License, v. 2.0. If a copy of the MPL was not distributed with this
6 rem file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 rem This file incorporates work covered by the following license notice:
10 rem Licensed to the Apache Software Foundation (ASF) under one or more
11 rem contributor license agreements. See the NOTICE file distributed
12 rem with this work for additional information regarding copyright
13 rem ownership. The ASF licenses this file to you under the Apache
14 rem License, Version 2.0 (the "License"); you may not use this file
15 rem except in compliance with the License. You may obtain a copy of
16 rem the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 set MYBOOTSTRAPTESTVALUE=0
21 .\testbootstrap 1 -env:MYBOOTSTRAPTESTVALUE=1
24 .\testbootstrap.exe file
27 .\testbootstrap.Exe file
30 .\testbootstrap.bin file
33 .\testbootstrap.Bin file
36 .\testbootstrap 0 -env:INIFILENAME=
39 set MYBOOTSTRAPTESTVALUE=
40 rem simply ignore the file...
41 .\testbootstrap default -env:INIFILENAME=
44 .\testbootstrap default -env:MYBOOTSTRAPTESTVALUE2=1 -env:INIFILENAME=
50 rem simple macro expansion
52 .\testbootstrap _first_second_third_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE=_${FIRST}_${SECOND}_${THIRD}_
56 .\testbootstrap _${FIRST}_${SECOND}_${THIRD}_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE=_\$\{FIRST\}_\$\{SECOND\}_\$\{THIRD\}_
60 .\testbootstrap TheKeysValue -env:MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheSection:TheKey}
62 rem ini access with simple macro expansion
64 .\testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:SECTIONNAME=TheSection -env:KEYNAME=TheKey -env:MYBOOTSTRAPTESTVALUE=${$ININAME:$SECTIONNAME:$KEYNAME}
66 rem ini access with complex macro expansion
68 .\testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:MYBOOTSTRAPTESTVALUE=${$ININAME:${$ININAME:SecondSection:IndirectSection}:${$ININAME:SecondSection:IndirectKey}}
70 rem test no infinite recursion
72 .\testbootstrap "***RECURSION DETECTED***" -env:MYBOOTSTRAPTESTVALUE=$MYBOOTSTRAPTESTVALUE
76 .\testbootstrap AAABBBCCC000 -env:MYBOOTSTRAPTESTVALUE=\u0041\u0041\u0041\u0042\u0042\u0042\u0043\u0043\u0043\u0030\u0030\u0030
79 @echo bootstrap test finished