BUG: string expand bombed out on first unknown construct

- eg,
       "$USER $(PWD) $USER"  ->  "username $(PWD) $USER"
  instead of
       "$USER $(PWD) $USER"  ->  "username $(PWD) username"

  this is noticable in some dynamicCode usages

STYLE: consolidate all string expand code into stringOps
This commit is contained in:
Mark Olesen
2011-03-02 13:46:15 +01:00
parent e65f566d68
commit 01ea4623f9
3 changed files with 43 additions and 150 deletions

View File

@ -88,7 +88,7 @@ int main(int argc, char *argv[])
Info<< "expanded: " << string(test).expand() << endl;
Info<<"dictionary-based substitution: " << dict << endl;
Info<< "expandDict: " << stringOps::expandDict(test, dict) << endl;
Info<< "expand dict: " << stringOps::expand(test, dict) << endl;
string test2("~OpenFOAM/controlDict");
Info<< test2 << " => " << test2.expand() << endl;