Update glue tests

This commit is contained in:
Richard Feldman 2022-07-24 11:57:01 -04:00
parent cc790a2773
commit ed69a73786
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
19 changed files with 74 additions and 105 deletions

View file

@ -65,22 +65,18 @@ where
run_with_stdin(&roc_binary_path, args, stdin_vals)
}
pub fn run_bindgen<I, S>(args: I) -> Out
pub fn run_glue<I, S>(args: I) -> Out
where
I: IntoIterator<Item = S>,
S: AsRef<OsStr>,
{
run_with_stdin(&path_to_bindgen_binary(), args, &[])
run_with_stdin(&path_to_roc_binary(), args, &[])
}
pub fn path_to_roc_binary() -> PathBuf {
path_to_binary("roc")
}
pub fn path_to_bindgen_binary() -> PathBuf {
path_to_binary("roc-bindgen")
}
pub fn path_to_binary(binary_name: &str) -> PathBuf {
// Adapted from https://github.com/volta-cli/volta/blob/cefdf7436a15af3ce3a38b8fe53bb0cfdb37d3dd/tests/acceptance/support/sandbox.rs#L680
// by the Volta Contributors - license information can be found in