From 78a7cdf7f32dfb53ba525307025de313d6548ccb Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Fri, 12 Oct 2012 17:52:52 +0100 Subject: [PATCH] ENH: Test-dictionary: test dictionary variable expansion --- applications/test/dictionary/Test-dictionary.C | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/applications/test/dictionary/Test-dictionary.C b/applications/test/dictionary/Test-dictionary.C index 42bdcabeaf8..287c63db217 100644 --- a/applications/test/dictionary/Test-dictionary.C +++ b/applications/test/dictionary/Test-dictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,6 +33,7 @@ Description #include "IOobject.H" #include "IFstream.H" #include "dictionary.H" +#include "stringOps.H" using namespace Foam; @@ -45,6 +46,16 @@ int main(int argc, char *argv[]) argList::validArgs.insert("dict .. dictN"); argList args(argc, argv, false, true); + { + dictionary dict; + dict.add("aaOPENMPIcc", 1); + + string s("DDD${aa${WM_MPLIB}cc}EEE"); + stringOps::inplaceExpand(s, dict, true, false); + Info<< "variable expansion:" << s << endl; + } + + Info<< nl << "FOAM_CASE=" << getEnv("FOAM_CASE") << nl << "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl -- GitLab