2024-04-16 11:08:58 +00:00
|
|
|
use crate::tests::{fail_test, run_test, TestResult};
|
2021-12-25 19:39:42 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn shorthand_env_1() -> TestResult {
|
2022-01-04 21:34:42 +00:00
|
|
|
run_test(r#"FOO=BAZ $env.FOO"#, "BAZ")
|
2021-12-25 19:39:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn shorthand_env_2() -> TestResult {
|
2024-04-16 11:08:58 +00:00
|
|
|
fail_test(r#"FOO=BAZ FOO=MOO $env.FOO"#, "defined_twice")
|
2021-12-25 19:39:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn shorthand_env_3() -> TestResult {
|
2022-01-04 21:34:42 +00:00
|
|
|
run_test(r#"FOO=BAZ BAR=MOO $env.FOO"#, "BAZ")
|
2021-12-25 19:39:42 +00:00
|
|
|
}
|