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