MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pf_close

Function pf_close

tests/test_pipeline_frozen.c:151–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149 cbm_unsetenv(names[2]) == 0 && cbm_unsetenv(names[3]) == 0;
150}
151static bool pf_close(pf_fixture_t *f) {
152 cbm_set_user_lang_config(f->previous_global);
153 bool ok = true;
154 if (f->env_saved)
155 for (size_t i = 0; i < 4; ++i) {
156 pf_env_value_t *v = &f->env[i];
157 int rc = v->present ? cbm_setenv(v->name, v->value, 1) : cbm_unsetenv(v->name);
158 const char *now = getenv(v->name);
159 if (rc || (v->present ? !pf_text(now, v->value) : now != NULL))
160 ok = false;
161 }
162 if (f->home[0] && th_rmtree(f->home))
163 ok = false;
164 return ok;
165}
166static bool pf_open(pf_fixture_t *f) {
167 memset(f, 0, sizeof(*f));
168 f->previous_global = cbm_get_user_lang_config();

Callers 1

Calls 5

cbm_set_user_lang_configFunction · 0.85
cbm_setenvFunction · 0.85
cbm_unsetenvFunction · 0.85
pf_textFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected