diff options
-rwxr-xr-x | sal/test/bootstrap.pl | 37 | ||||
-rw-r--r-- | sal/test/bootstraptest.ini | 3 | ||||
-rw-r--r-- | sal/test/makefile.mk | 17 | ||||
-rw-r--r-- | sal/test/testbootstrap.cxx | 4 |
4 files changed, 43 insertions, 18 deletions
diff --git a/sal/test/bootstrap.pl b/sal/test/bootstrap.pl index 101e3169d137..2c4ca939f723 100755 --- a/sal/test/bootstrap.pl +++ b/sal/test/bootstrap.pl @@ -5,9 +5,9 @@ eval 'exec perl -wS $0 ${1+"$@"}' # # $RCSfile: bootstrap.pl,v $ # -# $Revision: 1.3 $ +# $Revision: 1.4 $ # -# last change: $Author: kr $ $Date: 2001-10-11 13:14:37 $ +# last change: $Author: kr $ $Date: 2001-11-01 16:44:07 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -177,15 +177,20 @@ if (!$rc) { delete $ENV{MYBOOTSTRAPTESTVALUE}; -$rc = system "./testbootstrap", "default", "-env:INIFILENAME="; +$rc = system "./testbootstrap", "defaultvalue", "-env:INIFILENAME=", "-env:Default=defaultvalue"; if (!$rc) { - $comment = $comment . "exe custom ini test 2 not passed\n"; + $comment = $comment . "default test from parameter not passed\n"; $state = 0; } -$rc = system "./testbootstrap", "default", "-env:MYBOOTSTRAPTESTVALUE2=1", "-env:INIFILENAME="; +if ($ENV{GUI} eq "WNT") { + $rc = system "./testbootstrap", "defaultValue", "-env:iniName=default.ini", "-env:INIFILENAME="; +} +else { + $rc = system "./testbootstrap", "defaultValue", "-env:iniName=defaultrc", "-env:INIFILENAME="; +} if (!$rc) { - $comment = $comment . "exe custom ini test 3 not passed\n"; + $comment = $comment . "default test from custom ini not passed\n"; $state = 0; } @@ -215,15 +220,23 @@ if (!$rc) { # simple ini access $rc = system "./testbootstrap", - "TheKeysValue", - '-env:MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheSection:TheKey}'; + "TheIniKeysValue", + '-env:MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheIniKey}'; if (!$rc) { $comment = $comment . "simple macro ini access test not passed\n"; $state = 0; } +# simple profile access +$rc = system "./testbootstrap", + "TheKeysValue", + '-env:MYBOOTSTRAPTESTVALUE=${./bootstraptest.ini:TheSection:TheKey}'; +if (!$rc) { + $comment = $comment . "simple macro profile access test not passed\n"; + $state = 0; +} -# ini access with simple macro expansion +# profile access with simple macro expansion $rc = system "./testbootstrap", "TheKeysValue", "-env:ININAME=./bootstraptest.ini", @@ -231,17 +244,17 @@ $rc = system "./testbootstrap", "-env:KEYNAME=TheKey", '-env:MYBOOTSTRAPTESTVALUE=${$ININAME:$SECTIONNAME:$KEYNAME}'; if (!$rc) { - $comment = $comment . "ini access with simple macro expansion test not passed\n"; + $comment = $comment . "profile access with simple macro expansion test not passed\n"; $state = 0; } -# ini access with complex macro expansion +# profile access with complex macro expansion $rc = system "./testbootstrap", "TheKeysValue", "-env:ININAME=./bootstraptest.ini", '-env:MYBOOTSTRAPTESTVALUE=${$ININAME:${$ININAME:SecondSection:IndirectSection}:${$ININAME:SecondSection:IndirectKey}}'; if (!$rc) { - $comment = $comment . "ini access with complex macro expansion test not passed\n"; + $comment = $comment . "profile access with complex macro expansion test not passed\n"; $state = 0; } diff --git a/sal/test/bootstraptest.ini b/sal/test/bootstraptest.ini index 3980d98a2221..c6569f367fe9 100644 --- a/sal/test/bootstraptest.ini +++ b/sal/test/bootstraptest.ini @@ -1,3 +1,6 @@ +TheIniKey=TheIniKeysValue + + [TheSection] TheKey=TheKeysValue diff --git a/sal/test/makefile.mk b/sal/test/makefile.mk index ae23fe5d5e1c..cb98a3be746a 100644 --- a/sal/test/makefile.mk +++ b/sal/test/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.12 $ +# $Revision: 1.13 $ # -# last change: $Author: sb $ $Date: 2001-10-12 11:09:22 $ +# last change: $Author: kr $ $Date: 2001-11-01 16:44:07 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -122,7 +122,8 @@ ALL : ALLTAR \ .IF "$(GUI)"=="UNX" ALL: $(BIN)$/$(APP2TARGET).exe \ - $(BIN)$/inirc + $(BIN)$/inirc \ + $(BIN)$/defaultrc $(BIN)$/$(APP2TARGET).exe : $(APP2TARGETN) cp $(APP2TARGETN) $@ @@ -131,14 +132,22 @@ $(BIN)$/inirc: echo "MYBOOTSTRAPTESTVALUE=auxaux" > $@ echo "INHERITED_OVERWRITTEN_VALUE=inherited_overwritten_value" >> $@ +$(BIN)$/defaultrc: + echo "Default=defaultValue" > $@ + .ELSE -ALL: $(BIN)$/ini.ini +ALL: $(BIN)$/ini.ini \ + $(BIN)$/default.ini $(BIN)$/ini.ini: echo MYBOOTSTRAPTESTVALUE=auxaux > $@ echo INHERITED_OVERWRITTEN_VALUE=inherited_overwritten_value >> $@ + +$(BIN)$/default.ini: + echo Default=defaultValue > $@ + .ENDIF $(BIN)$/bootstrap.pl: diff --git a/sal/test/testbootstrap.cxx b/sal/test/testbootstrap.cxx index e36a89d4f238..2b6ef7676f32 100644 --- a/sal/test/testbootstrap.cxx +++ b/sal/test/testbootstrap.cxx @@ -33,7 +33,7 @@ int main( int argc, char *argv[] ) OUString iniName; Bootstrap::get(OUString(RTL_CONSTASCII_USTRINGPARAM("iniName")), iniName, OUString()); - if(iniName.getLength()) + if(iniName.getLength()) { OString tmp_iniName = OUStringToOString(iniName, RTL_TEXTENCODING_ASCII_US); fprintf(stderr, "using ini: %s\n", tmp_iniName.getStr()); @@ -43,7 +43,7 @@ int main( int argc, char *argv[] ) OUString name( RTL_CONSTASCII_USTRINGPARAM( "MYBOOTSTRAPTESTVALUE" )); - OUString myDefault( RTL_CONSTASCII_USTRINGPARAM( "default" )); + OUString myDefault( RTL_CONSTASCII_USTRINGPARAM("$Default")); OUString value; |