use crate::brain::prompt_builder::push_known_paths;
fn rendered() -> String {
let mut s = String::new();
push_known_paths(&mut s);
s
}
#[test]
fn paths_section_mentions_log_directory() {
let out = rendered();
assert!(
out.contains("~/.opencrabs/logs/"),
"must surface the log directory path; got: {out}"
);
}
#[test]
fn paths_section_mentions_daily_log_file_pattern() {
let out = rendered();
assert!(
out.contains("opencrabs.YYYY-MM-DD"),
"must surface the daily file naming pattern so the agent \
knows logs are rotated by date; got: {out}"
);
}
#[test]
fn paths_section_warns_against_repo_grepping() {
let out = rendered();
let lower = out.to_lowercase();
assert!(
lower.contains("do not grep") || lower.contains("never write"),
"must explicitly tell the agent NOT to look in the repo working dir for logs; got: {out}"
);
}
#[test]
fn paths_section_mentions_config_file() {
let out = rendered();
assert!(
out.contains("config.toml"),
"must surface the config path; got: {out}"
);
}
#[test]
fn paths_section_mentions_keys_file() {
let out = rendered();
assert!(
out.contains("keys.toml"),
"must surface the API-keys path; got: {out}"
);
}
#[test]
fn paths_section_mentions_brain_files() {
let out = rendered();
assert!(
out.contains("Brain files"),
"must surface the brain-files location; got: {out}"
);
}
#[test]
fn paths_section_mentions_plan_files() {
let out = rendered();
assert!(
out.contains("Plans:") && out.contains("opencrabs_plan_"),
"must surface where the plan tool persists JSON state; got: {out}"
);
}
#[test]
fn paths_section_is_short() {
let out = rendered();
let lines = out.lines().count();
assert!(
lines <= 14,
"Known paths section should stay compact; got {lines} lines"
);
}