| 164 | return ok; |
| 165 | } |
| 166 | static bool pf_open(pf_fixture_t *f) { |
| 167 | memset(f, 0, sizeof(*f)); |
| 168 | f->previous_global = cbm_get_user_lang_config(); |
| 169 | const char *home = th_mktempdir("cbm-frozen-input"); |
| 170 | if (!home || strlen(home) >= sizeof(f->home)) |
| 171 | return false; |
| 172 | memcpy(f->home, home, strlen(home) + 1); |
| 173 | return pf_path(f->source, sizeof(f->source), home, "source") && |
| 174 | pf_path(f->destination, sizeof(f->destination), home, "destination") && |
| 175 | pf_path(f->db, sizeof(f->db), f->destination, "candidate.db") && |
| 176 | pf_path(f->control, sizeof(f->control), home, "control.db") && |
| 177 | pf_path(f->saved, sizeof(f->saved), home, "saved.db") && |
| 178 | pf_path(f->config, sizeof(f->config), f->source, ".codebase-memory.json") && |
| 179 | th_mkdir_p(f->source) == 0 && th_mkdir_p(f->destination) == 0 && pf_env_start(f); |
| 180 | } |
| 181 | static bool pf_role(const cbm_node_t *node, const char *role) { |
| 182 | if (!node->properties_json) |
| 183 | return false; |
no test coverage detected