mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Test-dictionary: test dictionary variable expansion
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,6 +33,7 @@ Description
|
|||||||
#include "IOobject.H"
|
#include "IOobject.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
|
#include "stringOps.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -45,6 +46,16 @@ int main(int argc, char *argv[])
|
|||||||
argList::validArgs.insert("dict .. dictN");
|
argList::validArgs.insert("dict .. dictN");
|
||||||
argList args(argc, argv, false, true);
|
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
|
Info<< nl
|
||||||
<< "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
|
<< "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
|
||||||
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
||||||
|
|||||||
Reference in New Issue
Block a user