mirror of
https://github.com/nushell/nushell.git
synced 2024-12-26 00:50:03 +01:00
a21af0ade4
This reverts commit f0e93c2fa9
(PR #7417).
I'm currently [working on improving cell
paths](https://github.com/nushell/nushell/issues/7498#issuecomment-1356834798),
and I realized that I would need to make several improvements to `into
cellpath` along the lines of Jakub's comment here:
https://github.com/nushell/nushell/pull/7417#issuecomment-1345264955
I don't think `into cellpath` is quite ready for prime-time, and I'd
like to remove it before the upcoming release.
25 lines
521 B
Rust
25 lines
521 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")
|
|
}
|
|
|
|
#[test]
|
|
fn convert_non_string_env_var_to_nothing() -> TestResult {
|
|
run_test(
|
|
r#"let-env FOO = true; env | where name == FOO | get raw.0 | describe"#,
|
|
"nothing",
|
|
)
|
|
}
|