nushell/src/tests/test_env.rs
JT 8f6843c600
Move $nu.env to $env (#665)
* Move env from nu builtin to its own

* update samples/tests
2022-01-05 08:34:42 +11:00

17 lines
331 B
Rust

use crate::tests::{run_test, TestResult};
#[test]
fn shorthand_env_1() -> TestResult {
run_test(r#"FOO=BAZ $env.FOO"#, "BAZ")
}
#[test]
fn shorthand_env_2() -> TestResult {
run_test(r#"FOO=BAZ FOO=MOO $env.FOO"#, "MOO")
}
#[test]
fn shorthand_env_3() -> TestResult {
run_test(r#"FOO=BAZ BAR=MOO $env.FOO"#, "BAZ")
}