xref: /aoo42x/main/sal/test/bootstrap (revision cdf0e10c)
1*cdf0e10cSrcweir#/bin/tcsh
2*cdf0e10cSrcweir
3*cdf0e10cSrcweirsetenv MYBOOTSTRAPTESTVALUE 0
4*cdf0e10cSrcweirecho 1
5*cdf0e10cSrcweir./testbootstrap 1 -env:MYBOOTSTRAPTESTVALUE=1
6*cdf0e10cSrcweir
7*cdf0e10cSrcweirecho 2
8*cdf0e10cSrcweir./testbootstrap.bin file
9*cdf0e10cSrcweir
10*cdf0e10cSrcweirecho 3
11*cdf0e10cSrcweir./testbootstrap.Bin file
12*cdf0e10cSrcweir
13*cdf0e10cSrcweirecho 4
14*cdf0e10cSrcweir./testbootstrap.exe file
15*cdf0e10cSrcweir
16*cdf0e10cSrcweirecho 5
17*cdf0e10cSrcweir./testbootstrap.Exe file
18*cdf0e10cSrcweir
19*cdf0e10cSrcweirecho 6
20*cdf0e10cSrcweir./testbootstrap 0 -env:INIFILENAME=
21*cdf0e10cSrcweir
22*cdf0e10cSrcweirunsetenv MYBOOTSTRAPTESTVALUE
23*cdf0e10cSrcweirecho 7
24*cdf0e10cSrcweir./testbootstrap default -env:INIFILENAME=
25*cdf0e10cSrcweir
26*cdf0e10cSrcweirecho 8
27*cdf0e10cSrcweir./testbootstrap default -env:MYBOOTSTRAPTESTVALUE2=1 -env:INIFILENAME=
28*cdf0e10cSrcweir
29*cdf0e10cSrcweirecho
30*cdf0e10cSrcweirecho "macro tests"
31*cdf0e10cSrcweirecho
32*cdf0e10cSrcweir
33*cdf0e10cSrcweir# simple macro expansion
34*cdf0e10cSrcweirecho 9
35*cdf0e10cSrcweir./testbootstrap _first_second_third_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE='_${FIRST}_${SECOND}_${THIRD}_'
36*cdf0e10cSrcweir
37*cdf0e10cSrcweir# simple quoting
38*cdf0e10cSrcweirecho 10
39*cdf0e10cSrcweir./testbootstrap '_${FIRST}_${SECOND}_${THIRD}_' -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE='_\$\{FIRST\}_\$\{SECOND\}_\$\{THIRD\}_'
40*cdf0e10cSrcweir
41*cdf0e10cSrcweir# simple ini access
42*cdf0e10cSrcweirecho 11
43*cdf0e10cSrcweir./testbootstrap TheKeysValue -env:'MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheSection:TheKey}'
44*cdf0e10cSrcweir
45*cdf0e10cSrcweir# ini access with simple macro expansion
46*cdf0e10cSrcweirecho 12
47*cdf0e10cSrcweir./testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:SECTIONNAME=TheSection -env:KEYNAME=TheKey \
48*cdf0e10cSrcweir	 -env:'MYBOOTSTRAPTESTVALUE=${$ININAME:$SECTIONNAME:$KEYNAME}'
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir# ini access with complex macro expansion
51*cdf0e10cSrcweirecho 13
52*cdf0e10cSrcweir./testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini \
53*cdf0e10cSrcweir	-env:'MYBOOTSTRAPTESTVALUE=${$ININAME:${$ININAME:SecondSection:IndirectSection}:${$ININAME:SecondSection:IndirectKey}}'
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir# test no infinit recursion
56*cdf0e10cSrcweirecho 14
57*cdf0e10cSrcweir./testbootstrap "***RECURSION DETECTED***" -env:'MYBOOTSTRAPTESTVALUE=$MYBOOTSTRAPTESTVALUE'
58*cdf0e10cSrcweir
59*cdf0e10cSrcweir# test unicode
60*cdf0e10cSrcweirecho 15
61*cdf0e10cSrcweir./testbootstrap AAABBBCCC000 -env:'MYBOOTSTRAPTESTVALUE=\u0041\u0041\u0041\u0042\u0042\u0042\u0043\u0043\u0043\u0030\u0030\u0030'
62*cdf0e10cSrcweir
63*cdf0e10cSrcweirecho
64*cdf0e10cSrcweirecho "bootstrap test finished"
65*cdf0e10cSrcweirecho
66