1
1
mirror of https://github.com/casey/just.git synced 2024-11-23 02:44:56 +03:00
just/tests/shadowing_parameters.rs
2023-01-10 00:59:02 +00:00

24 lines
600 B
Rust

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",
}