diff options
author | Kay Ramme <kr@openoffice.org> | 2001-06-15 12:58:08 +0000 |
---|---|---|
committer | Kay Ramme <kr@openoffice.org> | 2001-06-15 12:58:08 +0000 |
commit | a6f532e523c154bde258d54f3b977f75dd991681 (patch) | |
tree | 5b7c92c95a613fc64f81d9eb62fe47ffa0a197b8 /sal/test | |
parent | 56da097501600ee6e02527741e71e148c9a897cc (diff) |
added macro expansion
Diffstat (limited to 'sal/test')
-rw-r--r-- | sal/test/bootstrap | 31 | ||||
-rwxr-xr-x | sal/test/bootstrap.bat | 26 | ||||
-rw-r--r-- | sal/test/bootstraptest.ini | 8 | ||||
-rw-r--r-- | sal/test/makefile.mk | 9 |
4 files changed, 70 insertions, 4 deletions
diff --git a/sal/test/bootstrap b/sal/test/bootstrap index 35529cf340c7..98c20494f2b9 100644 --- a/sal/test/bootstrap +++ b/sal/test/bootstrap @@ -15,4 +15,33 @@ echo 4 echo 5 ./testbootstrap default -env:MYBOOTSTRAPTESTVALUE2=1 -env:INIFILENAME= -echo bootstrap test finished
\ No newline at end of file +echo +echo "macro tests" +echo + +# simple macro expansion +./testbootstrap _first_second_third_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE='_${FIRST}_${SECOND}_${THIRD}_' + +# simple quoting +./testbootstrap '_${FIRST}_${SECOND}_${THIRD}_' -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE='_\$\{FIRST\}_\$\{SECOND\}_\$\{THIRD\}_' + +# simple ini access +./testbootstrap TheKeysValue -env:'MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheSection:TheKey}' + +# ini access with simple macro expansion +./testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:SECTIONNAME=TheSection -env:KEYNAME=TheKey \ + -env:'MYBOOTSTRAPTESTVALUE=${$ININAME:$SECTIONNAME:$KEYNAME}' + +# ini access with complex macro expansion +./testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini \ + -env:'MYBOOTSTRAPTESTVALUE=${$ININAME:${$ININAME:SecondSection:IndirectSection}:${$ININAME:SecondSection:IndirectKey}}' + +# test no infinit recursion +./testbootstrap "***RECURSION DETECTED***" -env:'MYBOOTSTRAPTESTVALUE=$MYBOOTSTRAPTESTVALUE' + +# test unicode +./testbootstrap AAABBBCCC000 -env:'MYBOOTSTRAPTESTVALUE=\u0041\u0041\u0041\u0042\u0042\u0042\u0043\u0043\u0043\u0030\u0030\u0030' + +echo +echo "bootstrap test finished" +echo diff --git a/sal/test/bootstrap.bat b/sal/test/bootstrap.bat index d0061e596919..af6554b5a7fa 100755 --- a/sal/test/bootstrap.bat +++ b/sal/test/bootstrap.bat @@ -15,4 +15,30 @@ rem simply ignore the file .... echo 5 .\testbootstrap default -env:MYBOOTSTRAPTESTVALUE2=1 -env:INIFILENAME= +echo +echo "macro tests" +echo + +rem simple macro expansion +.\testbootstrap _first_second_third_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE=_${FIRST}_${SECOND}_${THIRD}_ + +rem simple quoting +.\testbootstrap _${FIRST}_${SECOND}_${THIRD}_ -env:FIRST=first -env:SECOND=second -env:THIRD=third -env:MYBOOTSTRAPTESTVALUE=_\$\{FIRST\}_\$\{SECOND\}_\$\{THIRD\}_ + +rem simple ini access +.\testbootstrap TheKeysValue -env:MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheSection:TheKey} + +rem ini access with simple macro expansion +.\testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:SECTIONNAME=TheSection -env:KEYNAME=TheKey -env:MYBOOTSTRAPTESTVALUE=${$ININAME:$SECTIONNAME:$KEYNAME} + +rem ini access with complex macro expansion +.\testbootstrap TheKeysValue -env:ININAME=./bootstraptest.ini -env:MYBOOTSTRAPTESTVALUE=${$ININAME:${$ININAME:SecondSection:IndirectSection}:${$ININAME:SecondSection:IndirectKey}} + +rem test no infinit recursion +.\testbootstrap "***RECURSION DETECTED***" -env:MYBOOTSTRAPTESTVALUE=$MYBOOTSTRAPTESTVALUE + +rem test unicode +.\testbootstrap AAABBBCCC000 -env:MYBOOTSTRAPTESTVALUE=\u0041\u0041\u0041\u0042\u0042\u0042\u0043\u0043\u0043\u0030\u0030\u0030 + + @echo bootstrap test finished
\ No newline at end of file diff --git a/sal/test/bootstraptest.ini b/sal/test/bootstraptest.ini new file mode 100644 index 000000000000..3980d98a2221 --- /dev/null +++ b/sal/test/bootstraptest.ini @@ -0,0 +1,8 @@ +[TheSection] +TheKey=TheKeysValue + +[SecondSection] +IndirectSection=TheSection +IndirectKey=TheKey + + diff --git a/sal/test/makefile.mk b/sal/test/makefile.mk index 15e9db4b8e58..cba38d877ccd 100644 --- a/sal/test/makefile.mk +++ b/sal/test/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.5 $ # -# last change: $Author: jbu $ $Date: 2001-05-17 09:14:17 $ +# last change: $Author: kr $ $Date: 2001-06-15 13:53:54 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -108,7 +108,7 @@ APP2STDLIBS = $(SALLIB) # --- Targets ------------------------------------------------------ .IF "$(depend)" == "" -ALL : $(BIN)$/$(BOOTSTRAPSCRIPT) $(BIN)$/$(BOOTSTRAPINI) ALLTAR +ALL : $(BIN)$/$(BOOTSTRAPSCRIPT) $(BIN)$/$(BOOTSTRAPINI) $(BIN)$/bootstraptest.ini ALLTAR .ELSE ALL: ALLDEP .ENDIF @@ -125,6 +125,9 @@ $(BIN)$/$(BOOTSTRAPSCRIPT) : $(BOOTSTRAPSCRIPT) $(BIN)$/$(BOOTSTRAPINI) : testbootstrap.ini $(MY_SCRIPTCAT) testbootstrap.ini > $@ +$(BIN)$/bootstraptest.ini : bootstraptest.ini + $(MY_SCRIPTCAT) bootstraptest.ini > $@ + # --- SO2-Filter-Datei --- $(MISC)$/tsl$(UPD)$(DLLPOSTFIX).flt: @echo ------------------------------ |