chore: rename packages/ to crates/
Move all 29 workspace members from packages/<name>/ to crates/<name>/. Updates: workspace Cargo.toml (members + path deps), justfile, root CLAUDE.md, scripts/build/CARGO_INSTALL.md, docs/architecture/crates.md (renamed from packages.md), structural references in docs/architecture and docs/configuration, per-crate CLAUDE.md self-references. Historical plans, reports, and building/ docs are left untouched. No behavior change; just check-all stays green and fermata tests pass.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
use assert_cmd::Command;
|
||||
use predicates::prelude::*;
|
||||
use std::fs;
|
||||
|
||||
#[test]
|
||||
fn check_blocks_botignore_match() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
fs::write(tmp.path().join(".botignore"), ".env\n").unwrap();
|
||||
let target = tmp.path().join(".env");
|
||||
fs::write(&target, "").unwrap();
|
||||
|
||||
Command::cargo_bin("fermata")
|
||||
.unwrap()
|
||||
.args(["check", "--op", "read", target.to_str().unwrap()])
|
||||
.assert()
|
||||
.failure()
|
||||
.code(1)
|
||||
.stdout(predicate::str::contains(".env"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_allows_unmatched() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
fs::write(tmp.path().join(".botignore"), ".env\n").unwrap();
|
||||
let target = tmp.path().join("src.rs");
|
||||
fs::write(&target, "").unwrap();
|
||||
|
||||
Command::cargo_bin("fermata")
|
||||
.unwrap()
|
||||
.args(["check", "--op", "read", target.to_str().unwrap()])
|
||||
.assert()
|
||||
.success();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_emits_json_with_flag() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
fs::write(tmp.path().join(".botignore"), ".env\n").unwrap();
|
||||
let target = tmp.path().join(".env");
|
||||
fs::write(&target, "").unwrap();
|
||||
|
||||
let out = Command::cargo_bin("fermata")
|
||||
.unwrap()
|
||||
.args(["check", "--op", "read", "--json", target.to_str().unwrap()])
|
||||
.assert()
|
||||
.failure()
|
||||
.get_output()
|
||||
.stdout
|
||||
.clone();
|
||||
let v: serde_json::Value = serde_json::from_slice(&out).unwrap();
|
||||
assert_eq!(v["kind"], "deny");
|
||||
}
|
||||
Reference in New Issue
Block a user