From cde3f5e303b628dc170e1642fbc3076a48c81ae7 Mon Sep 17 00:00:00 2001 From: Kay Ramme Date: Thu, 1 Nov 2001 15:44:07 +0000 Subject: added tests for default and ini expansion (#91782#) --- sal/test/bootstrap.pl | 37 +++++++++++++++++++++++++------------ sal/test/bootstraptest.ini | 3 +++ sal/test/makefile.mk | 17 +++++++++++++---- 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; -- cgit lue='distro/lhm/libreoffice-7-2+backports'>distro/lhm/libreoffice-7-2+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/svx/source/dialog/grfflt.cxx
AgeCommit message (Expand)Author
2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen
2018-09-19weld GraphicFilterSmoothCaolán McNamara
2018-09-19weld GraphicFilterPosterCaolán McNamara
2018-09-19weld GraphicFilterMosaicCaolán McNamara
2018-09-19weld GraphicFilterSolarizeCaolán McNamara
2018-09-19weld GraphicFilterEmbossCaolán McNamara
2018-09-10No more need for extra local variablesStephan Bergmann
2018-09-06clang-tidy bugprone-use-after-move in BitmapFilter::FilterNoel Grandin
2018-06-12simplify calls to *DialogFactory::Create methodsNoel Grandin
2018-06-09remove cargo cult OSL_ENSURE(pFact, "ScAbstractFactory create fail!"(Noel Grandin
2018-05-09vcl: get rid of Bitmap{Ex}::Filter() and Animation::Filter()Chris Sherlock
2018-04-25tdf#42949 Remove unnecessary localization headers of svxGabor Kelemen
2018-02-27convert remaining WarningBox to weld::MessageDialogCaolán McNamara
2017-12-18convert SVX_GRAPHICFILTER constants to scoped enumNoel Grandin
2017-07-27loplugin:constparams in svxNoel Grandin
2017-07-21migrate to boost::gettextCaolán McNamara
2016-12-22convert BmpFilter to scoped enumNoel Grandin
2016-10-28ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivativesCaolán McNamara
2016-09-09loplugin:constantparam in svxNoel Grandin
2016-08-30convert RECT_POINT to scoped enumNoel Grandin
2016-05-27Convert GRAPHIC to scoped enumNoel Grandin
2016-03-17loplugin:constantparam in svxNoel Grandin
2016-03-15remove unnecessary parentheses in case labelsNoel Grandin
2016-02-09Remove excess newlinesChris Sherlock
2016-02-09Formatting changes across all modulesChris Sherlock
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-09-16boost->stdCaolán McNamara
2014-09-23fdo#82577: Handle WindowNoel Grandin
2014-09-12Turn SfxItemState into a C++11 scoped enumerationStephan Bergmann
2014-09-10Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULTStephan Bergmann
2014-08-18drop unnecessary shl.hxx includesCaolán McNamara
2014-07-26Massive 'Dialogdiet fail' and similar to 'Dialog creation failed'Matteo Casalin
2014-06-22Avoid possible memory leaks in case of exceptionsTakeshi Abe
2014-03-18sfx2: sal_Bool->boolNoel Grandin
2014-03-11svx: sal_Bool->boolNoel Grandin
2014-02-23Remove unneccessary commentsAlexander Wilms
2014-02-01convert emboss dialog to .uiCaolán McNamara
2014-02-01convert mosaic dialog to .uiCaolán McNamara
2014-02-01convert sepia dialog to .uiCaolán McNamara
2014-01-31drop unused resource id argumentCaolán McNamara
2014-01-31convert solarize dialog to .uiCaolán McNamara