1
1
mirror of https://github.com/casey/just.git synced 2024-11-26 23:27:26 +03:00
just/tests/shadowing_parameters.rs

24 lines
600 B
Rust
Raw Normal View History

test! {
name: parameter_may_shadow_variable,
justfile: "FOO := 'hello'\na FOO:\n echo {{FOO}}\n",
args: ("a", "bar"),
stdout: "bar\n",
stderr: "echo bar\n",
}
test! {
name: shadowing_parameters_do_not_change_environment,
justfile: "export FOO := 'hello'\na FOO:\n echo $FOO\n",
args: ("a", "bar"),
stdout: "hello\n",
stderr: "echo $FOO\n",
}
test! {
name: exporting_shadowing_parameters_does_change_environment,
justfile: "export FOO := 'hello'\na $FOO:\n echo $FOO\n",
args: ("a", "bar"),
stdout: "bar\n",
stderr: "echo $FOO\n",
}