Skip to content

Commit

Permalink
Add support for custom error
Browse files Browse the repository at this point in the history
  • Loading branch information
brumhard committed May 2, 2023
1 parent 530f93d commit fb97a9b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions mask/tests/supported_runtimes_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,28 @@ echo "this won't do anything..."
.failure();
}

#[test]
fn custom_not_found_error_if_program_not_found() {
let (_temp, maskfile_path) = common::maskfile(
r#"
## missing
~~~notfound
echo "this won't do anything..."
~~~
"#,
);

common::run_mask(&maskfile_path)
.command("missing")
.assert()
.code(1)
.stderr(contains(format!(
"{} program 'notfound' for executor 'notfound' not in PATH",
"ERROR:".red()
)))
.failure();
}

#[cfg(windows)]
#[test]
fn powershell() {
Expand Down

0 comments on commit fb97a9b

Please sign in to comment.