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