Skip to content
Snippets Groups Projects
Commit 78a7cdf7 authored by mattijs's avatar mattijs
Browse files

ENH: Test-dictionary: test dictionary variable expansion

parent d6cd28aa
Branches
Tags
No related merge requests found
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment