feat: a tiny bit of testing

This commit is contained in:
user0-07161 2026-03-12 15:19:12 +01:00
parent 299534fc67
commit 9b9e78a949
2 changed files with 9 additions and 6 deletions

View file

@ -76,12 +76,15 @@ mod tests {
return hello
"#;
let _pkg_info: PackageInfo = Okfr::run(
let pkg_info: PackageInfo = Okfr::run(
script.to_string(),
PathBuf::from("/tmp/build"),
PathBuf::from("/tmp/out"),
lua,
)
.unwrap();
assert_eq!(&pkg_info.name, "hello_world");
assert_eq!(&pkg_info.version, "v0.0.1");
}
}

View file

@ -27,13 +27,13 @@ pub enum PackageSource {
#[derive(Debug)]
pub struct PackageInfo {
name: String,
version: String,
pub name: String,
pub version: String,
deps: Rc<RefCell<HashMap<DepTime, HashSet<FetchedDep>>>>,
steps: Rc<RefCell<Vec<Step>>>,
pub deps: Rc<RefCell<HashMap<DepTime, HashSet<FetchedDep>>>>,
pub steps: Rc<RefCell<Vec<Step>>>,
create_dirs: Rc<RefCell<Vec<Dir>>>,
pub create_dirs: Rc<RefCell<Vec<Dir>>>,
}
#[derive(Debug)]