MCPcopy Create free account
hub / github.com/KDE/kdevelop / testExpandVariables

Method testExpandVariables

kdevplatform/util/tests/test_environment.cpp:176–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void TestEnvironment::testExpandVariables()
177{
178 QFETCH(ProcEnv, env);
179 QFETCH(ProcEnv, expectedEnv);
180
181 QProcessEnvironment fakeSysEnv;
182 fakeSysEnv.insert(QStringLiteral("PATH"), QStringLiteral("/bin:/usr/bin"));
183 fakeSysEnv.insert(QStringLiteral("HOME"), QStringLiteral("/home/tom"));
184
185 KDevelop::expandVariables(env, fakeSysEnv);
186
187 for (auto it = expectedEnv.cbegin(); it != expectedEnv.cend(); ++it) {
188 QCOMPARE(env.value(it.key()), it.value());
189 }
190}
191
192#include "moc_test_environment.cpp"

Callers

nothing calls this directly

Calls 3

insertMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected