Era tests: escaped newlines, no link into withheld lore in the fixture
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d646d59c46
commit
13e8c82059
2 changed files with 5 additions and 9 deletions
|
|
@ -225,10 +225,8 @@ mod tests {
|
|||
use ghostlight::EvidenceQuery;
|
||||
let state = tempfile::tempdir().unwrap();
|
||||
let vault = tempfile::tempdir().unwrap();
|
||||
write(vault.path(), "AetheriaLore/Aetheria/Worldbuilding/Post-Elysium/Aether.md", "The aether answers espers.
|
||||
");
|
||||
write(vault.path(), "AetheriaLore/Aetheria/Worldbuilding/Pre-Elysium/Collapse.md", "The grid fails.
|
||||
");
|
||||
write(vault.path(), "AetheriaLore/Aetheria/Worldbuilding/Post-Elysium/Aether.md", "The aether answers espers.\n");
|
||||
write(vault.path(), "AetheriaLore/Aetheria/Worldbuilding/Pre-Elysium/Collapse.md", "The grid fails.\n");
|
||||
let snapshot = VaultSnapshot::build(&production_profile("aetheria", vault.path()).unwrap()).unwrap();
|
||||
let store = state.path().join(SNAPSHOT_DIRECTORY);
|
||||
snapshot.import_into(&store).unwrap();
|
||||
|
|
|
|||
|
|
@ -2003,16 +2003,14 @@ mod tests {
|
|||
async fn withheld_lore_is_not_evidence() {
|
||||
let directory = tempfile::tempdir().unwrap();
|
||||
let root = directory.path();
|
||||
write(root, "Worldbuilding/Post-Elysium/Aether.md", "The aether answers espers.
|
||||
");
|
||||
write(root, "Worldbuilding/Pre-Elysium/Collapse.md", "The grid fails. See [[Aether]].
|
||||
");
|
||||
write(root, "Worldbuilding/Post-Elysium/Aether.md", "The aether answers espers.\n");
|
||||
write(root, "Worldbuilding/Pre-Elysium/Collapse.md", "The grid fails.\n");
|
||||
let built = snapshot(root);
|
||||
|
||||
let withheld = VaultEvidenceSource::from_snapshot(&built, "", &["Worldbuilding/Post-Elysium"]).unwrap();
|
||||
assert!(withheld.retrieve(&query(&["Aether"])).await.unwrap().is_empty());
|
||||
let collapse = withheld.retrieve(&query(&["Collapse"])).await.unwrap();
|
||||
assert!(collapse.iter().all(|receipt| !receipt.reference.as_str().contains("Post-Elysium")));
|
||||
assert!(collapse.iter().all(|receipt| !format!("{:?}", receipt.reference).contains("Post-Elysium")));
|
||||
|
||||
let open = VaultEvidenceSource::from_snapshot(&built, "", &[]).unwrap();
|
||||
assert_eq!(
|
||||
|
|
|
|||
Loading…
Reference in a new issue