feat: a tiny bit of testing
This commit is contained in:
parent
299534fc67
commit
9b9e78a949
2 changed files with 9 additions and 6 deletions
|
|
@ -76,12 +76,15 @@ mod tests {
|
||||||
return hello
|
return hello
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let _pkg_info: PackageInfo = Okfr::run(
|
let pkg_info: PackageInfo = Okfr::run(
|
||||||
script.to_string(),
|
script.to_string(),
|
||||||
PathBuf::from("/tmp/build"),
|
PathBuf::from("/tmp/build"),
|
||||||
PathBuf::from("/tmp/out"),
|
PathBuf::from("/tmp/out"),
|
||||||
lua,
|
lua,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
assert_eq!(&pkg_info.name, "hello_world");
|
||||||
|
assert_eq!(&pkg_info.version, "v0.0.1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@ pub enum PackageSource {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct PackageInfo {
|
pub struct PackageInfo {
|
||||||
name: String,
|
pub name: String,
|
||||||
version: String,
|
pub version: String,
|
||||||
|
|
||||||
deps: Rc<RefCell<HashMap<DepTime, HashSet<FetchedDep>>>>,
|
pub deps: Rc<RefCell<HashMap<DepTime, HashSet<FetchedDep>>>>,
|
||||||
steps: Rc<RefCell<Vec<Step>>>,
|
pub steps: Rc<RefCell<Vec<Step>>>,
|
||||||
|
|
||||||
create_dirs: Rc<RefCell<Vec<Dir>>>,
|
pub create_dirs: Rc<RefCell<Vec<Dir>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue