xref: /aoo42x/main/sal/test/bootstrap.bat (revision 86e1cf34)
15b501c92SAndrew Ristrem *************************************************************
25b501c92SAndrew Ristrem
35b501c92SAndrew Ristrem  Licensed to the Apache Software Foundation (ASF) under one
45b501c92SAndrew Ristrem  or more contributor license agreements.  See the NOTICE file
55b501c92SAndrew Ristrem  distributed with this work for additional information
65b501c92SAndrew Ristrem  regarding copyright ownership.  The ASF licenses this file
75b501c92SAndrew Ristrem  to you under the Apache License, Version 2.0 (the
85b501c92SAndrew Ristrem  "License"); you may not use this file except in compliance
95b501c92SAndrew Ristrem  with the License.  You may obtain a copy of the License at
105b501c92SAndrew Ristrem
115b501c92SAndrew Ristrem    http://www.apache.org/licenses/LICENSE-2.0
125b501c92SAndrew Ristrem
135b501c92SAndrew Ristrem  Unless required by applicable law or agreed to in writing,
145b501c92SAndrew Ristrem  software distributed under the License is distributed on an
155b501c92SAndrew Ristrem  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165b501c92SAndrew Ristrem  KIND, either express or implied.  See the License for the
175b501c92SAndrew Ristrem  specific language governing permissions and limitations
185b501c92SAndrew Ristrem  under the License.
195b501c92SAndrew Ristrem
205b501c92SAndrew Ristrem *************************************************************
21cdf0e10cSrcweir@echo off
22cdf0e10cSrcweirset MYBOOTSTRAPTESTVALUE=0
23cdf0e10cSrcweirecho 1
24cdf0e10cSrcweir.\testbootstrap 1 -env:MYBOOTSTRAPTESTVALUE=1
25cdf0e10cSrcweir
26cdf0e10cSrcweirecho 2
27cdf0e10cSrcweir.\testbootstrap.exe file
28cdf0e10cSrcweir
29cdf0e10cSrcweirecho 3
30cdf0e10cSrcweir.\testbootstrap.Exe file
31cdf0e10cSrcweir
32cdf0e10cSrcweirecho 4
33cdf0e10cSrcweir.\testbootstrap.bin file
34cdf0e10cSrcweir
35cdf0e10cSrcweirecho 5
36cdf0e10cSrcweir.\testbootstrap.Bin file
37cdf0e10cSrcweir
38cdf0e10cSrcweirecho 6
39cdf0e10cSrcweir.\testbootstrap 0 -env:INIFILENAME=
40cdf0e10cSrcweir
41cdf0e10cSrcweirecho 7
42cdf0e10cSrcweirset MYBOOTSTRAPTESTVALUE=
43cdf0e10cSrcweirrem simply ignore the file ....
44cdf0e10cSrcweir.\testbootstrap default -env:INIFILENAME=
45cdf0e10cSrcweir
46cdf0e10cSrcweirecho 8
47cdf0e10cSrcweir.\testbootstrap default -env:MYBOOTSTRAPTESTVALUE2=1 -env:INIFILENAME=
48cdf0e10cSrcweir
49cdf0e10cSrcweirecho
50cdf0e10cSrcweirecho "macro tests"
51cdf0e10cSrcweirecho
52cdf0e10cSrcweir
53cdf0e10cSrcweirrem simple macro expansion
54cdf0e10cSrcweirecho 9
55cdf0e10cSrcweir.\testbootstrap _first_second_third_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE=_${FIRST}_${SECOND}_${THIRD}_
56cdf0e10cSrcweir
57cdf0e10cSrcweirrem simple quoting
58cdf0e10cSrcweirecho 10
59cdf0e10cSrcweir.\testbootstrap _${FIRST}_${SECOND}_${THIRD}_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE=_\$\{FIRST\}_\$\{SECOND\}_\$\{THIRD\}_
60cdf0e10cSrcweir
61cdf0e10cSrcweirrem simple ini access
62cdf0e10cSrcweirecho 11
63cdf0e10cSrcweir.\testbootstrap TheKeysValue -env:MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheSection:TheKey}
64cdf0e10cSrcweir
65cdf0e10cSrcweirrem ini access with simple macro expansion
66cdf0e10cSrcweirecho 12
67cdf0e10cSrcweir.\testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:SECTIONNAME=TheSection -env:KEYNAME=TheKey -env:MYBOOTSTRAPTESTVALUE=${$ININAME:$SECTIONNAME:$KEYNAME}
68cdf0e10cSrcweir
69cdf0e10cSrcweirrem ini access with complex macro expansion
70cdf0e10cSrcweirecho 13
71cdf0e10cSrcweir.\testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:MYBOOTSTRAPTESTVALUE=${$ININAME:${$ININAME:SecondSection:IndirectSection}:${$ININAME:SecondSection:IndirectKey}}
72cdf0e10cSrcweir
73*86e1cf34SPedro Giffunirem test no infinite recursion
74cdf0e10cSrcweirecho 14
75cdf0e10cSrcweir.\testbootstrap "***RECURSION DETECTED***" -env:MYBOOTSTRAPTESTVALUE=$MYBOOTSTRAPTESTVALUE
76cdf0e10cSrcweir
77cdf0e10cSrcweirrem test unicode
78cdf0e10cSrcweirecho 15
79cdf0e10cSrcweir.\testbootstrap AAABBBCCC000 -env:MYBOOTSTRAPTESTVALUE=\u0041\u0041\u0041\u0042\u0042\u0042\u0043\u0043\u0043\u0030\u0030\u0030
80cdf0e10cSrcweir
81cdf0e10cSrcweir
825b501c92SAndrew Rist@echo bootstrap test finished
83