Skip to content

Commit

Permalink
Fix mac test
Browse files Browse the repository at this point in the history
  • Loading branch information
neunenak committed Jun 2, 2024
1 parent 73028a6 commit 0bee973
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ test! {

#[test]
fn unset_environment_variable_linewise() {
#[cfg(not(target_os = "macos"))]
let stderr_msg = "echo $JUST_TEST_VARIABLE\nbash: line 1: JUST_TEST_VARIABLE: unbound variable\nerror: Recipe `recipe` failed on line 4 with exit code 127\n";
#[cfg(target_os="macos")]
let stderr_msg = "echo $JUST_TEST_VARIABLE\nbash: JUST_TEST_VARIABLE: unbound variable\nerror: Recipe `recipe` failed on line 4 with exit code 127\n";

Test::new()
.justfile(
"
Expand All @@ -190,7 +195,7 @@ fn unset_environment_variable_linewise() {
",
)
.env("JUST_TEST_VARIABLE", "foo")
.stderr("echo $JUST_TEST_VARIABLE\nbash: line 1: JUST_TEST_VARIABLE: unbound variable\nerror: Recipe `recipe` failed on line 4 with exit code 127\n")
.stderr(stderr_msg)
.status(127)
.run();
}
Expand Down

0 comments on commit 0bee973

Please sign in to comment.